Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xsl] Use of data() function

From: Florent Georges <lists@------------>
To:
Date: 3/2/2008 1:03:00 PM
Mukul Gandhi wrote:

> test="" would test for EBV of the expression in "". That is
> the semantics of test="" syntax.

  Yes.  As well as for a few XPath constructs.  The idea is that from
any sequence you want to have just 'yes' or 'no.'  You don't have to
provide an expression that results in a singleton xs:boolean.  The
rules are something like:

    - if empty($seq) -> false
    - if non-empty sequence of nodes -> true
    - if singleton number -> flase if 0 or NaN
    - if singleton string or URI -> false if ''
    - if singleton boolean -> that boolean's value
    - else: type error

  See http://www.w3.org/TR/xpath20/#id-ebv for details.  Note in
particular that you can't have a sequence of atomic values.

  Without the EBV, you should provide a singleton xs:boolean each time
you use xsl:if, if, xsl:when, and, predicates, etc.  For instance
test="@married" would be an error; you should say
test="exists(@married)" or test="xs:boolean(@married)" instead.

  Regards,

--drkm






















      _____________________________________________________________________________ 
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail http://mail.yahoo.fr


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent