E
Efi Merdler
Hi,
I have an xml file with the following structure:
<Dictionary>
....
<Nested>
<Entry>
....
</Entry>
<Entry>
....
</Entry>
</Nested>
<Entry>
</Entry>
</Dictionary>
I want to iterate over all entries and print them however there is a
special printing for entries that reside in <Nested> tags and are not
the first one.
I'm using the following code:
<xsl:for-each select="//Entry">
<p>
<!--Check if entry is part of a nested entry.-->
<xsl:if test="name(..)='Nested' and position() > 1">
<xsl:text>Print:123456</xsl:text>
</xsl:if>
The name(..)='Nested' part is working however the position part does
not, I tried to find some info on the subject with no luck.
Do you have an idea ?
Thank,
Efi
I have an xml file with the following structure:
<Dictionary>
....
<Nested>
<Entry>
....
</Entry>
<Entry>
....
</Entry>
</Nested>
<Entry>
</Entry>
</Dictionary>
I want to iterate over all entries and print them however there is a
special printing for entries that reside in <Nested> tags and are not
the first one.
I'm using the following code:
<xsl:for-each select="//Entry">
<p>
<!--Check if entry is part of a nested entry.-->
<xsl:if test="name(..)='Nested' and position() > 1">
<xsl:text>Print:123456</xsl:text>
</xsl:if>
The name(..)='Nested' part is working however the position part does
not, I tried to find some info on the subject with no luck.
Do you have an idea ?
Thank,
Efi