[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

xpath confusion

Subject: xpath confusion
From: Bodrul Haque <Bodrul.Haque@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 3 Jul 2003 10:32:25 +0100
xpath root
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.