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

Re: Option mystery

Subject: Re: Option mystery
From: Kamal Bhatt <kbhatt@xxxxxxxxx>
Date: Thu, 14 Dec 2006 08:13:52 +1100
Re:  Option mystery
Oleg Konovalov wrote:
Hi,
I am trying to fix a bug in somebody else's XSLT1.0/Cocoon2.0.4 app.
I encountered something in the code which I don't understand.

<xsl:choose>
 <xsl:when test="$tier/option[option-num=$cur-option-num and
@rate-increase='true']">
   <option rate-increase="{@rate-increase}">
      <debug1>branch1</debug1>
       ...other elements
    </option>
  </xsl:when>
</xsl:choose>

Oleg, Is your code incomplete? Normally you wouldn't use choose/when where there is only one condition.

Sorry to hijack this question, but the $tier has me curious. I assume that $tier is a result tree fragment. Does that mean that there was code that did the following:

<xsl:variable name="tier">
 <xsl:copy-of select="<some path"/>
</xsl:variable>

Also (for the mailing list), is this a XSLT 2.0 thing or will it work for 1.0 as well. I have read this:

http://www.dpawson.co.uk/xsl/sect2/nodeset.html

and it seems to suggest you can't use this in 1.0, but I am not sure.

Thanks.


-- Kamal Bhatt

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.