Hey everybody,
I have some problems with XPath expressions.
I try to find out, if a node that I have stored in a variable is a child
node of the current node from a lop.
I will show you my xml and xmlt file where I have tryed this:
---My xml-file-----------
<websites>
<categorie name="Startseite">
<website id= "a1" pagename="Startseite" erstellt="20.08.2002"
geaendert="24.08.2002" />
</categorie>
<categorie name="Über uns">
<website id= "b1" pagename="Startseite" erstellt="20.08.2002"
geaendert="24.08.2002" />
</categorie>
<categorie name="Leistungen">
<website id= "c1" pagename="Leistungen" erstellt="20.08.2002"
geaendert="24.08.2002" />
</categorie>
<categorie name="Referenzen">
<website id= "d1" pagename="Startseite" erstellt="20.08.2002"
geaendert="24.08.2002" />
</categorie>
</websites>
------------------------------------------
-----my xmlt template-----
<xsl:template name="MainNav">
<xsl:variable name="aktPage">
<xsl:value-of select="//website[2]" />
</xsl:variable>
<xsl:for-each select="//categorie">
<xsl:choose>
<xsl:when test="$aktPage=./child::node()">
<p><strong><xsl:value-of select="@name"/></strong></p>
</xsl:when>
<xsl:otherwise>
<p><xsl:value-of select="@name"/></p> </xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</xsl:template>
--------------------------------
The aktPage variable shoud store the second website node of the xml-file.
The loop goes to every categorie and a want to test if the website node that
a stored in the aktPage variable is a child of the current loop entry
Mayby someone can help me
Thanks for any hint
Greetings from Germany
Heinz Willi Wiedow