This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: parent position()
- To: "'xsl-list at mulberrytech dot com'" <xsl-list at mulberrytech dot com>
- Subject: RE: parent position()
- From: Melle Zegel <melle dot zegel at finalist dot com>
- Date: Wed, 11 Oct 2000 14:21:33 +0200
- Reply-To: xsl-list at mulberrytech dot com
position(.)
perhaps
-----Oorspronkelijk bericht-----
Van: David Carlisle [mailto:davidc@nag.co.uk]
Verzonden: woensdag 11 oktober 2000 14:01
Aan: xsl-list@mulberrytech.com
Onderwerp: Re: parent position()
I believe position() is applied to the current context node.
I want to know the value of position() of the parent.
How can I do This?
Because I'm dealing with a while lot of recursiveness in my documents I
cannot, give position of the parent and than process the children.
I HAVE to process the children and only then I want to know the
position()
of the parent.
Does this make any sense at all??
I more or less wanted to use something like:
<xsl:value-of select="../position()"/>
Allright I know this is wrong, but it's probably the only way to describe
my problem.
you probably don't want position() at all. position() gives the position
in the current node list (ie the nodes selected by the currently active
apply-templates or for-each. So if you selct the parent with ..
the position() is always 1 as th enode list selected just has one node.
Probably you want something like
<xsl:for-each select="..">
<xsl:number/>
</xsl:for-each>
David
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list