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

Re: xpath question please

Subject: Re: xpath question please
From: "Simon Bracken" <sbracken@xxxxxxxxxxxxxxxx>
Date: Tue, 30 Sep 2003 16:38:58 -0700
simon bracken
> My xml source (typed carefully)

You are clearly having a bad day, as am I, so let's not quibble about the
well-formedness of your xml...

I assume you meant that the structure is like this

<Assembly>
   <Station name="Station1">
      <WI order="1" title="doc1">
         <Boards>
            <Board sn="111"/>
            <Board sn="112"/>
         </Boards>
      </WI>
      <!-- More WI elements -->
   </Station>
   <!-- More Station Elements -->
</Assembly>

If you have used 'select = "./WI/Boards/Board"' then each of the nodes
selected is a Board

'..' is the shorthand for referring to the parent node.  In this context
'../@order' is asking for the order attribute of the parent of a Board i.e
the order attribute of a Boards element.  You should expect 'a blank' in
this case.  What you appear to require is the order attribute of the
grandparent of the Board so you should use '../../@order'

Cheers,

Simon


 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.