Inserts the value of the selected node as text.
Syntax
<xsl:value-of select="pattern" >
Attributes
- select
- XSL pattern to be matched against the current context. The default value is ".", which inserts the value of the current node. For a description of the syntax, see XSL Pattern Syntax.
Element Information
Number of occurrences Unlimited Parent elements xsl:attribute, xsl:comment, xsl:copy, xsl:element, xsl:for-each, xsl:if, xsl:otherwise, xsl:pi, xsl:template, xsl:when Child elements (No child elements) Requires closing tag Yes. XSL is an XML grammar and, like all XML grammars, all tags must have closing tags to satisfy the definition of well-formed.
Remarks
The xsl:value-of element inserts a text string representing the value of the first element (in document order) specified by the select attribute.
If the XSL pattern returns more than a single node, the xsl:value-of element returns the text of the first node returned (equivalent to the DOM Node object's selectSingleNode method). If the node returned is an element with substructure, xsl:value-of returns the concatenated text nodes of that element's subtree with the markup removed.
See Also