<xslTutorial creator="Ben@cScape.com">
<index keywords='xsl:if'/>

<description>Selecting elements based on values of other ones. 
</description>

<xmlSource id="id1">
<DOCUMENT>
<TAG1>Hello</TAG1>
<TAG2>Hello</TAG2>
<TAG3>World</TAG3>
<TAG4>Europe<TAG5>World</TAG5></TAG4>
</DOCUMENT>
</xmlSource>

<attValues>
<value match="">
</value>
</attValues>

<xslStylesheet id="id2">
<xsl:output method="html"/>
<xsl:template match="/">
<xsl:if test="//DOCUMENT[TAG1 = TAG2]">
<xsl:value-of select="//DOCUMENT/TAG1"/>
</xsl:if>
<BR/>
<xsl:if test="//DOCUMENT[TAG3 = TAG4/TAG5]">
<xsl:value-of select="//TAG4/text()"/>
</xsl:if>
</xsl:template>
</xslStylesheet>
</xslTutorial>