Expressions

The complete expression language includes the locations paths and patterns described above, but it also contains a wider set of features built around the use of functions to manipulate and analyze data items of various types, and operators to compare objects and perform various calculations.

Where expressions are allowed

XSLT allows full expressions to be used in a number of places. They are used in the Select attribute of the Copy Of element, Parameter element, Sort element (so long as it returns a string), Variable element, Value Of element (so long as it returns a string), and the With Parameter element:

<copy-of select="expression">...</copy-of>

<param select="expression">...</param>

<sort select="expression">...</sort> <variable ...

Get XSL companion, The 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.