[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Re: Finding the position of an element wrt to othe
On Sun, Nov 21, 2010 at 1:32 AM, Rashi Bhardwaj <rashi.bhardwaj@xxxxxxxxx> wrote: > with 342, it means the position of that b element which have child c > and relative to first b element (whether it has child c or not); as > specified my xpath > > ="//b[c][not(@name=preceding::b[child::c]/@name)]/@name > > With the above xpath in my sample xml three b element will be select, > namely, b[@name='3'], b[@name='4'] and b[@name='2'], now the position > of these above selected b elements relative to first 'b' element > (b[@name='1']) will be 3 and 4 for the b's which are child of first > <a> and 2 for the b in second <a>. Instead of: <xsl:value-of select="position()"/> try something like: <xsl:number level="single" format="1"/> -Brandon :)
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|