[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: "Kathy Burke" <Kathy_Burke@xxxxxxxxx>
Date: Tue, 30 Sep 2003 17:43:06 -0400
kathryn burke
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:  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

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.