[Bug 1430] New: [DM] Further simplification of EBV

http://www.w3.org/Bugs/Public/show_bug.cgi?id=1430

           Summary: [DM] Further simplification of EBV
           Product: XPath / XQuery / XSLT
           Version: Last Call drafts
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Data Model
        AssignedTo: Norman.Walsh@Sun.COM
        ReportedBy: mrys@microsoft.com
         QAContact: public-qt-comments@w3.org


We appreciate the achieved simplifications of EBV. We still would prefer if 
EBV could be simplified further by disallowing numeric and string value and 
only provide that semantics for fn:boolean which then could be used by the 
XPath 1.0 backwards compatibility mode to deal with the XSLT expectations. 

We would like to see EBV to be:

	· If $arg is the empty sequence, EBV is false.
	· If $arg is a sequence whose first item is a node, EBV is true.
	· If $arg is a singleton value of type xs:boolean or a derived from 
xs:boolean, EBV is $arg.
	· In all other cases, EBV raises a type error [err:FORG0006].

Then define fn:boolean() as

	· If $arg is a singleton value of type xs:string or a type derived 
from xs:string or xdt:untypedAtomic, fn:boolean returns false if the operand 
value has zero length; otherwise it returns true. <= Raise an issue, recommend 
EBV to not do it, and let XSLT stylesheets use fn:boolean() instead for 
backwards-compat.
	· If $arg is a singleton value of any numeric type or a type derived 
from a numeric type, fn:boolean returns false if the operand value is NaN or 
is numerically equal to zero; otherwise it returns true.<= Raise an issue, 
recommend EBV to not do it, and let XSLT stylesheets use fn:boolean() instead 
for backwards-compat.
	· In all other cases, fn:boolean results in the EBV of $arg.

Received on Friday, 13 May 2005 22:32:09 UTC