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

Subject: [xsl] Retrieving the position of an ancestor in nested <xsl:for-each>
From: "Jonny Pony" <jonnypony666@xxxxxxxxxxx>
Date: Tue, 04 May 2004 10:54:38 +0000
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 unpersvnlich? Mit einer Webcam wird der MSN Messenger zum Bildtelefon! http://www.msn.de/messenger Jetzt kostenlos downloaden und mitmachen!


Current Thread