| Subject: Re: [xsl] xpath question please From: "Simon Bracken" <sbracken@xxxxxxxxxxxxxxxx> Date: Tue, 30 Sep 2003 16:38:58 -0700 | 
> 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 | 
|---|
| 
 | 
| <- Previous | Index | Next -> | 
|---|---|---|
| Re: [xsl] xpath question please, David Carlisle | Thread | RE: [xsl] xpath question please, Kathy Burke | 
| [xsl] Handling Mixed Child Elements, Brook Ellingwood | Date | Re: [xsl] java - standard implement, WebShark | 
| Month |