[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Re: [xsl] Get position of parent
Subject: Re: [xsl] Get position of parent From: Mukul Gandhi <gandhi.mukul@xxxxxxxxx> Date: Sat, 17 Jan 2009 20:06:23 +0530 |
I think, it could be something like, count(../preceding-sibling::entry) + 1 On Sat, Jan 17, 2009 at 7:12 PM, Philip Vallone <philip.vallone@xxxxxxxxxxx> wrote: > Hello List, > > What is the best way to get the position of a parent node? In the below xml, > assume my context node is para: > > /table/tgroup/tbody/row/entry[1]/para > > If my context node is para, how do I get the position of its parent entry? > > <table frame="all" align="center" id="C-TABLE3" width="90%"> > <title>Title</title> > <tgroup cols="3"> > <colspec colnum="1" colname="spycolgen1" colwidth="*"/> > <colspec colnum="2" colname="spycolgen2" colwidth="*"/> > <colspec colnum="3" colname="spycolgen3" colwidth="*"/> > <tbody> > <row> > <entry> > <!--get position of parent::entry--> > <para id="table3-para 1">context > node</para> > </entry> > <entry> > <para>test</para> > </entry> > <entry> > <para>test</para> > </entry> > </row> > </tbody> > </tgroup> > </table> > > > > > Thanks > Phil -- Regards, Mukul Gandhi
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Get position of parent, Philip Vallone | Thread | RE: [xsl] Get position of parent, Philip Vallone |
[xsl] Get position of parent, Philip Vallone | Date | Re: [xsl] [XSL] Two "Philisophical", David Carlisle |
Month |
Keywords