xsl-list
[Top] [All Lists]

RE: xsl:if with params

2004-09-24 08:24:29
OK, thanks Michael and David, i understand it now. I think i'll specifcially say

  <xsl:param name="main" select="false()"/>

to make what i'm doing more clear...


Citando Michael Kay <mike(_at_)saxonica(_dot_)com>:


So, when i'm making

      <xsl:if test="$main">

what am i saying in english?


You are saying: when I convert the value of $main to a boolean, is the
result true?

The values that convert to false (in 1.0) are the boolean false(), the
number 0, a zero-length string, and an empty node-set. Everything else
converts to true.

When you specify a stylesheet parameter like this:

   <xsl:param name="p"/>

then the default value (if the caller supplies no value) is a zero length
string.

Michael Kay
http://www.saxonica.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>
--+--









O SAPO já está livre de vírus com a Panda Software, fique você também!
Clique em: http://antivirus.sapo.pt


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