xsl-list
[Top] [All Lists]

Re: [xsl] Option mystery

2006-12-13 12:26:09
1) But how can there be 2 words in one root name, "option" & "rate-increase" ?

2)  Yes, there is another "when" there, but it has another value of
debug=branch2
and doesn't show up in the output, so I don't think it is involved. Correct ?



On 12/13/06, cknell(_at_)onebox(_dot_)com <cknell(_at_)onebox(_dot_)com> wrote:
> 1) is that "option" a predefined XSLT1.0 construct / keyword / operation ?

No. "option" is the root element of an XML document stored in a variable called 
"$tier". It may look something like this based on the XPath in the test:

<option rate-increase="">
 <option-num></option-num?
</option>

>2) the bug I am trying to fix ...

Is there another <xsl:when> or an <xsl:otherwise> elements in the <xsl:choose> ?
--
Charles Knell
cknell(_at_)onebox(_dot_)com - email



-----Original Message-----
From:     Oleg Konovalov <olegkon(_at_)gmail(_dot_)com>
Sent:     Wed, 13 Dec 2006 14:07:13 -0500
To:       xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject:  [xsl] Option mystery

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>

A few questions regarding snippet:
1) is that "option" a predefined XSLT1.0 construct / keyword / operation ?
I can't find any in the XSLT book.
Could you please explain it to me what that is (in details).

2) the bug I am trying to fix is that somehow on exit I am getting a node
with <option rate-increase="false"> (that debug1=branch1 and
option-num=1).  How is that possible ?   That "branch1" is unique and
can't come from any other place. How can that expression inside []
fail ?


Sorry for the newbie questions.

Thank you in advance,
Oleg.

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



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