|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: how to use // starting from the root, when i am few step
Babu, > <applytemplates select="what to put here if i >want to start from the root//ten" If you start an XPath with '/', then it goes from the root. If you want to get all the 'ten' elements in the source, then the XPath you want is '//ten'. If you meant all the 'ten' elements from the 'root' element (which is the document element in your case), then you can use '/root//ten' (though this gives exactly the same effect as 'root' is the document element). Generally you should try to avoid using '//' in your XPaths wherever possible because it's very inefficient. Give a step-by-step path to the node you're interested in instead: /root/one/two/three/four/five/six/seven/eight/nine/ten and don't forget that you can cut this down if you're already some way down the tree (and an ancestor of the element you're interested in; for example, if the current node is 'four', then you just have to do: five/six/seven/eight/nine/ten you don't have to go all the way back to the root node and start again. I hope that this helps, Jeni Jeni Tennison http://www.jenitennison.com/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|

Cart








