D
Dennis Westermann
I have the following problem
XML-File:
<SEARCH>
<TAG>'x' or 'y'</TAG>
</SEARCH>
<CHARLIST>
<CHAR>a</CHAR>
<CHAR>x</CHAR>
<CHAR>f</CHAR>
<CHAR>z</CHAR>
<CHAR>r</CHAR>
<CHAR>y</CHAR>
<CHAR>u</CHAR>
</CHARLIST>
Stylesheet:
this works:
<xsl:variable name="var" select="'x' or 'y'"/>
<xsl:for-each select="//CHARLIST[CHAR=$var]">
<xsl:value-of select="$var"/>
</xsl:for-each>
=> output= x y
this doesn't work -> why? what can I do that this works too?:
<xsl:variable name="var" select="//SEARCH/TAG"/>
<xsl:for-each select="//CHARLIST[CHAR=$var]">
<xsl:value-of select="$var"/>
</xsl:for-each>
=> no output
XML-File:
<SEARCH>
<TAG>'x' or 'y'</TAG>
</SEARCH>
<CHARLIST>
<CHAR>a</CHAR>
<CHAR>x</CHAR>
<CHAR>f</CHAR>
<CHAR>z</CHAR>
<CHAR>r</CHAR>
<CHAR>y</CHAR>
<CHAR>u</CHAR>
</CHARLIST>
Stylesheet:
this works:
<xsl:variable name="var" select="'x' or 'y'"/>
<xsl:for-each select="//CHARLIST[CHAR=$var]">
<xsl:value-of select="$var"/>
</xsl:for-each>
=> output= x y
this doesn't work -> why? what can I do that this works too?:
<xsl:variable name="var" select="//SEARCH/TAG"/>
<xsl:for-each select="//CHARLIST[CHAR=$var]">
<xsl:value-of select="$var"/>
</xsl:for-each>
=> no output