![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: Count preceding-sibling back to a specific node >Thread Next - Re: Count preceding-sibling back to a specific node Re: Count preceding-sibling back to a specific nodeTo: NULL Date: 3/4/2004 2:46:00 PM Oleg, Thanks! I got it to work. But I don't quite understand something about xslt. If I write: <xsl:param name="node-where-stop" select="an XPath expression that selects my node"/> it works. If instead I plug in the same XPath expression in place of $node-where-stop in the count() it doesn't work. Why? I assume it has something to do with needing a node set. Is there some way I could write the equivalent directly into the count()? I am asking because I am trying to insert this into an Auto-calculation in Stylesheet Designer. mike ----- Oleg Tkachenko [MVP] wrote: ----- mikeT wrote: > If I can identify a node by its id and I know that it is in the set of preceding-sibling of my context node can I count the number of preceding-sibling from the context node back to that node? May be something like count( preceding-sibling::*[ not( following-sibling::*[count(.|$node-where-stop)=1] ) ] ) -- Oleg Tkachenko [XML MVP, XmlInsider] http://blog.tkachenko.com | ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
