Click to return to the XML (Extensible Markup Language) home page    
xsl:template Element     xsl:when Element     XSL Elements    
Web Workshop  |  XML (Extensible Markup Language)

xsl:value-of Element


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

Creating and Populating an HTML Template



Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.