![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Xpath context >Thread Next - Re: Xpath context Re: Xpath contextTo: NULL Date: 4/4/2005 8:06:00 PM t.cimoli@g... writes: > Hi all. > i have a question: xpath queries are allowed only in the current > context? > Every example i find seems so. > For example: i have to count the position of a child respect to its > siblings and i have a pointer to him, but i am in an other place on the > object tree. How can i use the standard query > (count(*[name()=$ObjName]/following-sibling::*) +1 ) > on that child - whose pointer is stored under a variable ?- > Thank you everyone. If $x holds a node set then you can do (count($x/*[name()=$ObjName]/following-sibling::*) +1 ) to count the following siblings of the child of $x whose name is $onjName. David | ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
