Magazine |
| | Community |
| | Workshop |
| | Tools & Samples |
| | Training |
| | Site Info |
|
|
||||||||
|
Evaluates an XSL pattern in the select attribute and returns the value of the requested element as text, which is inserted into the template.
Syntax
<xsl:value-of select="pattern" >
Attributes
- select
- XSL pattern to be matched against the current context. The default value is "node()". For a description of the syntax, see XSL Pattern-Matching Syntax.
Element Information
Number of occurrences Unlimited Parent elements xsl:attribute, xsl:cdata, xsl:comment, xsl:copy, xsl:element, xsl:for-each, xsl:if, xsl:otherwise, xsl:pi, xsl:template, xsl:text, 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
If the XSL pattern returns more than a single node, the value-of element returns the text of the first node returned (equivalent to the DOM XMLDOMNode object's selectSingleNode method). If the node returned is an element with substructure, value-of returns the concatenated text nodes of that element's subtree with the markup removed (equivalent to the XMLDOMNode object's text property). The value-of element implementation is equivalent to the value returned in the variable bGetValueResult in the following DOM calls:
BSTR bPattern, bGetValueResult; IXMLDOMNode * pX, *pXResult; ... // assume initialized pX->selectSingleNode(bPattern, &pXResult); pXResult->get_text(&bGetValueResult);
See Also
Does this content meet your programming needs? Write us!
© 1998 Microsoft Corporation. All rights reserved. Terms of use.