-
Notifications
You must be signed in to change notification settings - Fork 11
Resolving
XRX++ identifies the code to be executed when calling an URL by a resolving mechanism. This mechanism splits the URL of the request into the following sections:
- Server-URL
- project identification
- data object ID (archival/collections context + local ID)
- application to be called
Thus "http://monasterium.net/mom/search" connects to the MOM-CA app search, "http://monasterium.net/mom/AT-MAGresten/Urkunden/1/charter" to the charter with the id 1
in the archival fond Urkunden
of the archive with the id AT-MAGresten
, for which it calls the MOM-CA app charter. Be aware that the app called is defined only by the URI-pattern in the application manifesto, not by the name of the app. Thus "http://monasterium.net/mom/home" doesn't lead to a (not-existent) 'home' app, but leads to the MOM-CA-app mom, because this app contains the appropriate uri-pattern for home
.
To achieve this, the basic entry point to resolving is the "Request Context" Section of core/app/xrx/xrx.xqm
.
During resolving, a global variable $xrx:tokenized-uri
is created, which includes the sections of the URL after the server URL and the project identification (e.g. http://www.monasterium.net/mom/
) split by /
. In MOM-CA, the initial tokens (last()-1
) contain information on archives, archival fonds, collections, and signatures which are used in the atom:id
.
The last token defines the application to be executed by matching it to the xrx:resolver/xrx:map/xrx:uripattern
defined in the applications. This evaluation step is executed by the resolver
function defined in core/apps/xrx/resolver.xqm
.
Related: