Extended functions

Apart from the functions XSLT inherits from XPath (described in Chapter 13), this standard adds a few more that are particularly useful to this application. The key() function has already been discussed, and the next section discusses the format-number() function. The remaining new functions are introduced here.

Current function

The current() function identifies the current node. In many circumstances, it refers to the same node that '.' does. However, the exact meaning of '.' depends on where it is used within a location path expression. This function, though, always refers to the node that triggered the template, regardless of where it is used in an expression.

Document function

The document() function allows the content ...

Get XML Companion, The, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.