T
Tassilo J. Klein
Hi there,
I got a XML file looking like that:
<Entries>
<Entry Id=1>
<First></First>
<Second></Second>
<Third></Third>
</Entry>
<Entry Id=2>
<First></First>
<Second></Second>
<Third></Third>
<Fourth></Fourth>
</Entry>.
[...]
<Entries>
I would like to check whether there exists a tag inside one of the
"Entry"s e.g. "Fourth".
I tried something like:
<xsl:template match="First">
<xsl:when test="..//Fourth">
<xsl:text>Found it</xsl:text>
</xsl:when>
<xsltherwise>
<xsl:text>Didn't find it</xsl:text>
</xsltherwise>
</xsl:template>
But it somehow doesn't work - I don't know why - probably, because I am
quite new to this ;-). Any idea?
Greetings,
- Tassilo -
I got a XML file looking like that:
<Entries>
<Entry Id=1>
<First></First>
<Second></Second>
<Third></Third>
</Entry>
<Entry Id=2>
<First></First>
<Second></Second>
<Third></Third>
<Fourth></Fourth>
</Entry>.
[...]
<Entries>
I would like to check whether there exists a tag inside one of the
"Entry"s e.g. "Fourth".
I tried something like:
<xsl:template match="First">
<xsl:when test="..//Fourth">
<xsl:text>Found it</xsl:text>
</xsl:when>
<xsltherwise>
<xsl:text>Didn't find it</xsl:text>
</xsltherwise>
</xsl:template>
But it somehow doesn't work - I don't know why - probably, because I am
quite new to this ;-). Any idea?
Greetings,
- Tassilo -