apply-stylesheet (stylesheet source-designator &key output parameters uri-resolver navigator)
The value returned by sax:end-document when called on the designated output sink.
Apply a stylesheet to a document.
This function takes a stylesheet (either a parsed stylesheet or a designator for a XML file to be parsed) and a source document, specified using the XML designator source-designator, and applies the stylesheet to the document.
An XML designator is any value accepted by cxml:parse, in particular:
An output sink designator has the following form:
Parameters are identified by names, and have values that are strings. Top-level parameters of these names are bound accordingly. If a paramater is not specified, its default value is computed as implemented in the stylesheet. If parameters are specified that the stylesheet does not recognize, they will be ignored.
A uri-resolver is a function taking a PURI object as an argument and returning a PURI object as a value. The URI resolver will be invoked for all references to external files, e.g. at compilation time using xsl:import and xsl:include, and at run-time using the document() function.
The URI resolver can be used to rewrite URLs so that file http:// links are replaced by file:// links, for example. Another application are URI resolvers that signal an error instead of returning, for example so that file:// links are forbidden.
The specified navigator will be passed to XPath protocol functions.