Subject: [xsl] xpath confusion From: Bodrul Haque <Bodrul.Haque@xxxxxxxxxxxxxxxxxxxxxxx> Date: Thu, 3 Jul 2003 10:32:25 +0100 |
Hi List Members, With the following xml: <Root> <Keys> <Client id="abc"> <a /> <!-- a /--> <b /> </Client> </Keys> </Root> XPath: "Root/Keys/Client[@id="abc"]/ descendant-or-self::node()" selects 4 nodes XPath: "Root/Keys/Client[@id="abc"]/ descendant-or-self::comment()" selects 1 node 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 would like to select the 3 nodes <Client>, <a /> and <b />. Any help is appreciated. TIA Bodrul --------------------------------------------------------------------------- The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any views or opinions presented in this Email message are solely those of the author and do not necessarily represent those of Synergy Logistics Limited unless specifically stated. Email communications are not necessarily secure and therefore Synergy Logistics Limited does not accept legal responsibility for the contents of this message. If you are not the intended recipient and have received this message in error, Please notify Synergy Logistics Limited immediately. Synergy Logistics Ltd. 01509 232706 XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] xslt processor benchmarks, Kevin Jones | Thread | Re: [xsl] xpath confusion, Jeni Tennison |
RE: [xsl] question regd. xsl transl, xsl user | Date | [xsl] efficiency with id(), James Cummings |
Month |