Supported Platforms
Related Documentation
- ACX, EX, M, MX, PTX, SRX, T Series
- XPath Expressions Overview for SLAX
- ACX, EX, J, M, MX, SRX, T Series
- message
- terminate
- trace
- uexpr
expr
Syntax
expr expression;
Release Information
Statement introduced in version 1.0 of the SLAX language.
Description
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 "<", ">", and "&", 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.
Attributes
expression | — | XPath expression to evaluate. The resulting string is added to the result tree. |
SLAX Example
expr "Test: "; expr substring-before(name, "."); expr status; expr jcs:output("Test");
XSLT Equivalent
<xsl:text>Test: </xsl:text> <xsl:value-of select="substring-before(name, '.')"/> <xsl:value-of select="status"/> <xsl:value-of select="jcs:output('Test')"/>
Usage Examples
- Example: Adding a Final then accept Term to a Firewall
- Example: Automatically Configuring Logical Interfaces and IP Addresses
Related Documentation
- ACX, EX, M, MX, PTX, SRX, T Series
- XPath Expressions Overview for SLAX
- ACX, EX, J, M, MX, SRX, T Series
- message
- terminate
- trace
- uexpr
Published: 2013-03-05
Supported Platforms
Related Documentation
- ACX, EX, M, MX, PTX, SRX, T Series
- XPath Expressions Overview for SLAX
- ACX, EX, J, M, MX, SRX, T Series
- message
- terminate
- trace
- uexpr