XSLT/XPATH - Special Character

Table of Contents

1 - 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}.

2 - Example

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

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

Data Science
Data Analysis
Data Science
Linear Algebra Mathematics

Powered by ComboStrap