xsl-list
[Top] [All Lists]

Re: Selecting attribute from previous parent node

2006-01-27 17:39:54
Hi, Andrea,

select="ancestor::flower[1]/@type"

either with xsl:value-of or with xsl:apply-templates.

Jay Bryant
Bryant Communication Services

----- Original Message ----- 
From: "Andrea Berman" <andrea(_dot_)berman(_at_)gmail(_dot_)com>
To: <xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
Sent: Friday, January 27, 2006 4:28 PM
Subject: [xsl] Selecting attribute from previous parent node


It's Friday!  Please, have pity upon me and save my sanity!

Say I have the following style of XML:

<row>
   <basket>
     <flower type="rose">
       <basket>
         <flower type="tulip">
           <basket>
              ...
           </basket>
         </flower>
       </basket>
     </flower>
   </basket>
</row>

If I'm at node "flower" with type of "tulip", how do I reference the
previous flower's type?


Thanks!

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>