XSLT/XPATH - Special Character

Card Puncher Data Processing

Curly brace

Curly braces cause the text inside the quotes to be processed as an XPath expression instead of being interpreted as a literal string.

Curly braces are recognized anywhere that an attribute value template can occur. (Attribute value templates are defined in section 7.6.2 of the XSLT specification, and they appear several places in the template definitions).

In such expressions, curly braces can also be used to refer to:

  • the value of an attribute, {@foo},
  • or to the content of an element {foo}.

Example

<xsl:template match="B|I|U">
 <xsl:element name="{name()}">
 <xsl:apply-templates/>
 </xsl:element> 
</xsl:template>

The curly brace cause the XPath name() function to return the name of the current node.





Discover More
Card Puncher Data Processing
XSLT - Variable

There are two elements that can be used to bind variables: xsl:variable and xsl:param. The difference is that the value specified on the xsl:param variable is only a default value for the binding;...



Share this page:
Follow us:
Task Runner