Subject: RE: [xsl] xpath question please From: "Kathy Burke" <Kathy_Burke@xxxxxxxxx> Date: Tue, 30 Sep 2003 17:43:06 -0400 |
Of course, I hadn't tried {ancestor::Station/@name} which I just tried...ugh. Thanks anyway. Kathy -----Original Message----- From: Kathy Burke [mailto:Kathy_Burke@xxxxxxxxx] Sent: Tuesday, September 30, 2003 5:25 PM To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx' Subject: [xsl] xpath question please Please don't yell at me. I've been trying to solve this all day, have reviewed xpath syntax, etc. Just can't get it right. I'm working on a stylesheet that creates html table rows etc. using AVTs to assign the form id's needed (see below). All was going fine until I went down to another level and now I can't get the higher level element attributes...just getting blanks. My xml source (typed carefully): <Assembly> <Station name="Station1"> <WI order="1" title="doc1"> <Board sn="111"/> <Board sn="112"/> <WI order="2" title="doc2"> <Boards> <Board sn="111"/> <Board sn="112"/> </Boards> </WI> <WI order="3" title="doc3"> <Boards> <Board sn="111"/> <Board sn="112"/> </Station> <Station name="Station2"> <WI order="1" title="doc7"> <Board sn="111"/> <Board sn="112"/> <WI order="2" title="doc2"> <Boards> <Board sn="111"/> <Board sn="112"/> </Boards> </WI> </Station> </Assembly> When I use this: <xsl:for-each select="./WI"> This works <tr id=Show_{../@name}_{@order} > -- gives me the correct @name of the <Station> and @order for the <WI> But when I get to this level: <xsl:for-each select="./WI/Boards/Board">, I still need the @name of Station and the @order of <WI> but can't get them. I hope this is clear enough. I'm afraid to tell you what I've tried because I ended up trying anything and even guessing. For example, shouldn't {../@order} at this level given me the order attribute for WI? Afraid I'm truly lost at this point. Simple though it should be. Thanks, Kat XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] xpath question please, Simon Bracken | Thread | [xsl] fo:external-graphic src="http, Ibeling, Narisa |
[xsl] fo:external-graphic src="http, Ibeling, Narisa | Date | [xsl] integrating full-page images , ejansson |
Month |