|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: xpath confusion
Hi Bodrul, > XPath: "Root/Keys/Client[@id="abc"]/ descendant-or-self::text()" > selects 0 nodes. > > Please can someone explain to me why the last xpath doesn't select 3 > nodes. I guess that whatever XSLT processor you're using (probably MSXML) is stripping the whitespace-only text nodes (there should be four of them) between the elements/comments. > I would like to select the 3 nodes <Client>, <a /> and <b />. Any > help is appreciated. In other words, following the pattern of the other paths that you've been trying, the three elements in the descendant-or-self axis from the <Client> element: Root/Keys/Client[@id = "abc"]/descendant-or-self::* * matches element nodes in this context because the "principal node type" of the descendant-or-self axis are element nodes. (In XSLT 2.0, you can also use "element()" as a node test that matches all elements.) Cheers, 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








