Xslt

http://net.tutsplus.com/tutorials/html-css-techniques/getting-started-with-xslt/

Example of using variable:

<xsl:variable name="groupHeader" select="Name"/>

<xsl:if test="not(contains($groupHeader, 'GroupID :'))">
  <xsl:apply-templates select="Address"/>,&#160;
    <xsl:value-of select="City"/>,&#160;
    <xsl:value-of select="State"/>&#160;
    <xsl:value-of select="Zip"/>
    <xsl:value-of select="Country" />
</xsl:if>

In the above code, we are inside an element with the tag name EntityData, and it has a child element named Name. The first line selects the content of the child element named Name, and assigned it to a variable named groupHeader. Then, we use the xsl:if statement to examine if the variable groupHeader contains the string 'GroupID :'.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License