Microsoft HomeproductssearchsupportshopWrite Us   Microsoft Home
Magazine
 |  Community
 |  Workshop
 |  Tools & Samples
 |  Training
 |  Site Info

Workshop  |  XML (Extensible Markup Language)

xsl:value-of Element


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

XSL Elements, xsl:stylesheet


Does this content meet your programming needs? Write us!

Back to topBack to top

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

 

Magazine Home
Ask Jane
DHTML Dude
Extreme XML
For Starters
More or Hess
Servin' It Up
Site Lights
Web Men Talking
Member Community Home
Benefits: Freebies & Discounts
Benefits: Promote Your Site
Benefits: Connect with Your Peers
Benefits at a Glance
Online Special-Interest Groups
Your Membership
SBN Stores
Join Now
Workshop Home
Essentials
Content & Component Delivery
Component Development
Data Access & Databases
Design
DHTML, HTML & CSS
Extensible Markup Language (XML)
Languages & Development Tools
Messaging & Collaboration
Networking, Protocols & Data Formats
Reusing Browser Technology
Security & Cryptography
Server Technologies
Streaming & Interactive Media
Web Content Management
Workshop Index
Tools & Samples Home
Tools
Samples, Headers, Libs
Images
Sounds
Style Sheets
Web Fonts
Training Home
SBN Live Seminars
SBN Live Chats
Courses
Peer Support
CD-ROM Training
Books & Training Kits
Certification
SBN Home
New to SBN?
What's New on SBN
Site Map
Site Search
Glossary
Write Us
About This Site