xsl:value-of

Creates a new text node that contains the string value of an expression.

Format

<xsl:value-of select="expression" 
               
  [disable-output-escaping="yes|no"]/>
               

            

Description

The XSLT processor evaluates expression and converts the result to a string. If the string is not empty, a text node is created and added to the result. If the string is empty, the xsl:value-of instruction has no effect.

You can specify the disable-output-escaping attribute of the xsl:value-of instruction. The allowed values are yes and no. The default is no. If the value is yes, the text node generated by instantiating the xsl:value-of element is output without any escaping.

Tip

 

You can create an xsl:value-of element automatically using the XSLT mapper.

Example

<xsl:template match = "author">
               
<p>
               
  <xsl:value-of select = "first-name"/>
               
  <xsl:text> </xsl:text>
               
  <xsl:value-of select = "last-name"/>
               
</p>
               
</xsl:template>
               

            

This example creates an HTML paragraph from an author element. The author element has first-name and last-name children. The resulting paragraph contains the value of the first first-name child element of the current node, followed by a space, followed by the value of the first last-name child element of the current node.

SQL/XML Tutorial

Many developers need to be able to write applications that work for databases from multiple vendors. This SQL/XML Tutorial refers to SQL/XML, XQuery, and Native XML Programming Languages to do just that.

ETL - Extract, Transform, Load

Designing Extract, Load and Tranform (ETL) applications including ETL data warehousing, etl design and etl programming is easy with Stylus Studio's XML and ETL Tools. Start ETL Programming today.

The Stylus Studio Advantage

Read in their own words, why customers have decided to make the switch to Stylus Studio, the World's best XML editor.

DTD Generator

Stylus Studio's DTD Generator supports the automatic generation and association of both internal and external DTDs based on XML instance documents.

Stylus Most Wanted

 
Free Stylus Studio XML Training:
W3C Member