Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?





Release Information

Statement introduced in version 1.0 of the SLAX language.


Generate the string value of an XPath expression and add it to the result tree. The XPath expression might consist of a function call, a location path, a literal number, or a string. SLAX-specific operators are permitted. This statement cannot be used at the top-level of a script. It can only appear within a code block. By default, characters such as "<", ">", and "&" are escaped into proper XML as "&lt;", "&gt;", and "&amp;", respectively.

The expr statement is most commonly used to invoke functions that return no results, for conditional variable assignment, and to return text content from a template.


expressionXPath expression to evaluate. The resulting string is added to the result tree.

SLAX Example

XSLT Equivalent

Usage Examples