xsl-list
[Top] [All Lists]

Retrieving the position of an ancestor in nested <xsl:for-each>

2004-05-04 03:54:38
Hi,

how can I retrieve the position of an ancestor in a nested <xsl:for-each>-loop?

My xml:

<?xml version="1.0" encoding="UTF-8"?>
<superNode>
        <Node>
                <SubNode>bla</SubNode>
                <SubNode>bla</SubNode>
                <SubNode>bla</SubNode>
        </Node>
        <Node>
                <SubNode>bla</SubNode>
        </Node>
        <Node>
                <SubNode>bla</SubNode>
                <SubNode>bla</SubNode>
        </Node>
        <Node>
                <SubNode>bla</SubNode>
        </Node>
</superNode>


The nested <xsl:for-each>:

<xsl:for-each select="Node">
        ...
        <xsl:for-each select="SubNode">
Position of Node: <xsl:value-of select="??????????"/> <!-- How will I get the position of the anchestor -->
                Position of SubNode: <xsl:value-of select="position()"/>
        </xsl:for-each>
</xsl:for-each>


Thanks
Jonny

_________________________________________________________________
E-Mails sind zu unpersönlich? Mit einer Webcam wird der MSN Messenger zum Bildtelefon! http://www.msn.de/messenger Jetzt kostenlos downloaden und mitmachen!



<Prev in Thread] Current Thread [Next in Thread>