xsl-list
[Top] [All Lists]

Re: [xsl] Option mystery

2006-12-13 14:20:00
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="{(_at_)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


--~------------------------------------------------------------------
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>