XSLT
From Friend2Friend Wiki
XSLT is a W3C standard language for transforming XML documents, and v1.0 been a recommendation for since 1999. EXSLT, which extends the capabilities of XSLT, has been widely implemented, and is used by this project. W3C abandoned v1.1 was abandoned in favour of v2.0, which is a recommendation, but not yet widely implemented.
XSLT programs are themselves XML documents, and are called stylesheets, since they have with <xsl:stylesheet> as the root node. Stylesheets are a mixture of elements in the xsl namespace (which are interpreted) and others (which are treated as literals). They always require a well-formed XML document (a DOM Document) as input, and usually generate well-balanced XML as output (can be a fragment).
Perhaps because of its unusual role as an XML transformation language, some find XSLT has a steep learning curve. Wikipedia mentions the problem that XSL requires learning of XPath, a relatively simple but expressive language used for navigating around XML documents. Most of the xsl elements have an attribute, e.g. "select", which contains an XPath expression that calculates a function of the input document.
Contents |
Relevance to F2F
F2F is a core technology used by F2F; most of the module resources rely on it:
- Displays use XSLT to process f2f:displayreqs
- Filters use XSLT to process f2f:messages
- Hooks use XSLT to process the contents of the invoking f2f:hookreq
- Services use XSLT to process f2f:servicereqs
XSL Extensions
As well as standard XSLT, F2F stylesheets have the following extra options:
- F2F internal parameters are available to the stylesheet through automatically added top-level <xsl:param> elements
- A set of templates are available for use with <xsl:call-template>, most notably f2f:core, which allows access to core services and public services
- The output is processed by the servicereq processing model
File Extensions
For clarity, the XSL Transforms in this project have different two file extensions:
- .XSLT (Serverside transforms)
- .XSL (Clientside transforms)

