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

Re: Use of data() function

Subject: Re: Use of data() function
From: Florent Georges <lists@xxxxxxxxxxxx>
Date: Sun, 2 Mar 2008 14:02:16 +0100 (CET)
Re:  Use of data() function
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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Cast Your Vote

We need your help – Vote for DataDirect XML Products!

  • Best SOA or XML site

Winners and finalists announced at SOA World Conference in November.

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-2007 All Rights Reserved.