Package xuriella

Xuriella is an implementation of XSLT 1.0.

About This Package

Using XSLT
Compiling stylesheets explicitly
Defining extension elements
Functions useful in extensions

Using XSLT

XSLT stylesheets are invoked using the apply-stylesheet function, which can parse, compile, and apply XSLT stylesheets.

Top-level parameters to the stylesheet can be specified using parameter instances created by make-parameter.

Apply a stylesheet to a document. ...

The class of top-level parameters to XSLT stylesheets.

Parameters are identified by expanded names, i.e. a namespace URI and local-name.

Their value is string.


Creates a paramater. ...

Compiling stylesheets explicitly

parse-stylesheet allows the compilation of XSLT stylesheets into objects ahead of time, so that apply-stylesheet only needs to invoke the pre-compiled sheet rather than having to parse and compile it first.

Parse a stylesheet. ...

The class of stylesheets that have been parsed and compiled.

Pass instances of this class to apply-stylesheet to invoke them.


Defining extension elements

Xuriella can be extended in two ways:

Custom XPath functions can be implemented using the extension mechanism in Plexippus.

Custom XSLT elements can be implemented using the following macros.

define-extension-group is used to establish a namespace for the extensions, which can then be activated using a namespace declaration and the extension-element-prefixes attribute in the stylesheet.

Every individual extension element needs at least a definition using define-extension-parser. The parser will run at compilation time and return an XSLT instruction in a sexp syntax. If the extension can be implemented as a transformation into ordinary XSLT elements, the parser only needs to return that XSLT sexp.

In addition, the sexp representation itself can be extended using define-extension-compiler. The extension compiler will be invoked while the stylesheet is compiled to return a function, usually a closure, that will be called by the stylesheet at run-time.

Defines an XSLT extension group with specified short name and namespace uri. ...

Defines a parser an extension element. ...



Defines symbol as a name to be used in Xuriella's sexp representation for XSLT.

It used when XSLT in sexp syntax includes a list of the form:

(symbol ...arguments...)


The list arguments is then destructured using the specified lambda list, and body is invoked during compilation time as an implicit progn.

body should return a function of one argument, which will be called at run time with a context object as an argument.


Functions useful in extensions

The following functions can be used by extension parsers and compilers, to parse child nodes as instructions, or to compile such instructions, respectively.

Parses the children of an XSLT instruction. ...

Compiles an XSLT instruction. ...

Exported Symbol Index

apply-stylesheet, function
compile-instruction, function
define-extension-compiler, macro
define-extension-group, macro
define-extension-parser, macro
make-parameter, function
parameter, class
parameter, type
parameter-local-name, function
parameter-uri, function
parameter-value, function
parse-body, function
parse-stylesheet, function
stylesheet, class
stylesheet, type
xslt-error, class
xslt-error, type