Name

<xsl:value-of>

Synopsis

<xsl:value-of select= pattern />

Description

Extracts a specific value from a source tree. The only attribute to the <xsl:value> element is a single pattern-matching expression that resolves to the value of a string, an element, or an attribute.

<xsl:template match="index">
   This index is <xsl:value-of select="@(type)">
   <xsl:apply-templates/>
</xsl:template>

The select attribute extracts the value of an element or attribute in the source tree and prints it verbatim in the result tree.

Get XML Pocket Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.