![]() |
![]() | ![]() | ![]() | 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 nodeTo: NULL Date: 3/5/2004 5:37:00 PM mikeT wrote: > 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. If your XPath expression depends on context, then obviously it won't work. Something like "id('bk101')" or "/A/B" doesn't depend on context, but A/B or id(@foo) does. Anyway that's bad idea not to use variable here due to obvious perf reason - having expression instead of variable you may end up with evaluating the same expression over and over again. -- Oleg Tkachenko [XML MVP, XmlInsider] http://blog.tkachenko.com | ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
