[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: number continuation problem

Subject: RE: number continuation problem
From: "Andrew Welch" <AWelch@xxxxxxxxxxxxxxx>
Date: Fri, 27 Jun 2003 13:17:56 +0100
if preceding sibling

Thanks for your help so far, I could use it some more as Im really stuck converting what we have to multi-level...


Here the point of interest is the nested <if> in the first <else>.  The numbering should follow from the parent (as in brackets).

Im working with your last post:

1 +
count(preceding-sibling::node) +
count(parent::if/preceding-sibling::if[count(node)&gt;count(following-sibling::*[1][self::else]/node)]/node) +
count(parent::else/preceding-sibling::if[position()&gt;1][count(node)&gt;count(following-sibling::*[1][self::else]/node)]/node) +

Im going down the route of selecting all preceding <step>'s, then filtering the ones we don’t want, instead of counting in all the ones we do (as it works at the moment).  Is that the right approach? 

I can virtually gurantee nesting only goes one deep, so I also tried adding another set of count()'s to the xpath that work on parents parents, but to no avail (and I think the preceding:: route is the preferred one).

Any further assistance would be great,


Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.491 / Virus Database: 290 - Release Date: 18/06/2003

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.