xsl:if

Conditionally instantiates the contained template body.

Format

<xsl:if test = "expression">
               
template_body
               
</xsl:if>
               

            

Description

The XSLT processor evaluates the expression and converts the result to a Boolean value. If the result is true, the XSLT processor instantiates template_body. If the result is false, the xsl:if element has no effect.

Example

This following example formats a group of names as a comma-separated list:

<xsl:template match="namelist/name">
               
  <xsl:value-of select="." />
               
  <xsl:if test="not(position()=last())">, </xsl:if>
               
</xsl:template>
               

            

If you want the XSLT processor to choose which template to instantiate from several possibilities, specify the xsl:choose instruction. See xsl:choose.

XML Grid View

The XML Grid View is a visual interface for editing tablular data structures using an intuitive spreadsheet-like interface.

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.

Using DTD in Microsoft Applications

Learn how to integrate DTD's into your Microsoft applications using MSXML or System.XML DTD processing components.

XML File Explorer

The XML File Explorer provides a productive, consistent, and easy-to-use interface for working with any data sources (relational data, EDI, binary, XML, CSV, and more) used in enterprise data integration projects.

Stylus Most Wanted

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.