|
Subject: Re: [xsl] xpath question please From: David Carlisle <davidc@xxxxxxxxx> Date: Tue, 30 Sep 2003 22:47:46 +0100 |
> My xml source (typed carefully):
but indented _very_ strangely
<WI order="1" title="doc1">
<Board sn="111"/>
<Board sn="112"/>
That indentation would suggest that 112 was a child of 111 but of course
it's a sibling, and they are both children of WI.
Your Xpath was lloking for Board grandchildren of WI so won't find
either of these.
<WI order="3" title="doc3">
<Boards>
<Board sn="111"/>
<Board sn="112"/>
</Station>
That's not even well formed, the station element is closed at a point
that Boards and WI are still open.
It's hard to guess the real structure of your input given this.
> For example, shouldn't {../@order} at this level given me
> the order attribute for WI?
No you are selecting Board elements that are grandchildren of WI (with
a Boards parent) ../@order would slect order from their parent but
that's Board not WI you need ../../@order. Although some of teh board
elements in your example were children of WI, some grandchildren and
some notwell formed at all, so its hard to be sure exactly
David
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] xpath question please, Kathy Burke | Thread | Re: [xsl] xpath question please, Simon Bracken |
| [xsl] integrating full-page images , ejansson | Date | RE: [xsl] java - standard implement, Michael Kay |
| Month |