[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: hierarchic counting in flat structures
Hi Michael, [Michael Kay]: > <xsl:number from="H3" level="any"/> > > It's not the usual use case given for level="any", but I think it > should work, provided that an H3 actually exists. That works - almost. :-) One detail remains to be dealt with. The input XML I am working on is not the most professional one. ;-) <DOK> <H3>b&</H3> <H4>b&</H4> <- "outer H4" <some> <tag> <H4>b&</H4> <- "inner H4" </tag> </some> <H4>b&</H4> <- "outer H4" b& </DOK> Of course, your solution counts all the "inner H4", too. However, I don't want these to be be considered. So, I extend your proposal a bit: <xsl:number count="DOK/H4" from="H3" level="any"/> And there we go - this yields the result I have been looking for. Thanks for your help, best wishes, Norbert
|
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
|