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

xpath numbering question

Subject: xpath numbering question
From: mark bordelon <markcbordelon@xxxxxxxxx>
Date: Mon, 15 Sep 2008 11:14:27 -0700 (PDT)
 xpath numbering question
Dear XSL group,

I feat I am wracking my brains again on something simple.

If my xml looks like this:

<A>
  <B1>  
    <C1>
    <C2>
    <C3>
  <B2>  
    <C4>
    <C5>
    <C6>
  <B3>  
    <C7>
    <C8>
    <C9>
</A>

I am trying to access C nodes by position relative to root using xpath. 

For example, to get C9, this does not work: //C[ position()=9 ]  //C[ 9 ]
presumably because the context to begin counting C nodes is the B node, and there are ony a maximum of 3 C nodes in that context.

My programming spec is to access a node using //, which in the above example translates to {<C1> .. <C9>}
Is this possible with Xpath?



Thanks,
Mark Bordelon
Getty Trust

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.