[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: referring to previous elements

Subject: RE: referring to previous elements
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Thu, 6 Sep 2001 12:26:59 +0100
xml previous element
>    In the following XML , i would like to have the value of 
> the previous 
> element in a "xsl:variable".can anybody give me a solution.

If the current node is an <action>, you can do
<xsl:if test="not(adq = preceding-sibling::action[1]/adq)">

You don't need variables.

Mike Kay
> 
> <durs>
>     <actions>
>         <action>
>             <adq>ADQ1</adq>
>             <subadq>SADQ1</subadq>
>         </action>
>         <action>
>             <adq>ADQ2</adq>
>             <subadq>SADQ2</subadq>
>         </action>
>         <action>
>             <adq>ADQ3</adq>
>             <subadq> SADQ3</subadq>
>         </action>
>     </actions>
> </durs>
> 
> In the above XML, i would like to do a test whether "ADQ1 != ADQ2".
> 
> How can this be done using XSL.i tried using xsl:variable, 
> but couldn't
> achieve.
> 
> Regards,
> Senthil.
> 
> 
> 
> 
> 
>  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.