XRL is suite of accessors that provide a mechanism for flexible creation and serving of static or dynamic content. XRL
is additionally useful in providing a flexible way to define module interfaces.
It consists of five distinct parts:
- xrl: scheme which resolves xrl: scheme URI's to internal
services via lookup in a table.
- XRL mapper which maps an external uri space to an internal uri space. This
allows an arbitrary URI space such as a website map to be mapped into resources that
are stored or generated in a different structure.
- XRL linker which provides a convenient template filling and link resolution
operations as well as some convenient low level document manipulation functions. It has the
concept of templates and content.
- XRL Resolve which maps internal xrl: scheme URI's to their
external URI, useful when resolving single links for example when doing a redirect.
- XRL export which exports all external links in a links document
to an external location. This is useful for deploying all content on a static web server.
XRL Links Document
These parts operate using a common links file specification. The links file may be specified
as an operator argument to the accessors but if omitted will default to
the resource ffcpl:/etc/XRLLinks.xml
. The resource must be parsable XML with the
following structure:
<links basepath="ffcpl:/mybase/">
...
<link>
<name>link_name</name>
<ext>external_uri</ext>
<int>internal_uri</int>
<args>param,links,cookie</args>
</link>
...
</links>
Link Syntax
@basepath is the basepath from which all external URIs will be resolved.
name is the link name that will be exposed as the URI
xrl:link_name
.
ext is an external URI which may be
relative to @basepath, if no ext is defined then the link
is purely for internal use.
int is an internal URI to be resolved in the private address space of the module
making the XRL request. This is often mapped to a service invocation or static resource
within the module.
args defines a set of space separated argument names to pass through to the request
if they are available. Special "all" keyword implies that all arguments should be passed. Arguments
which are specified but not on the request are silently ignored.
Internal and external URIs may use the xrl: scheme in which case they will be recursively
resolved.
Example
XRL by Example