Effective Boolean Value

Hi,

While implementing the function fn:boolean, I came across what I think is 
an inconsistency.

* XML Path Language (XPath) 2.0 - 2.3.4.2 Effective Boolean Value 
[http://www.w3.org/TR/xpath20/#id-ebv]

  fn:boolean returns false if its operand is any of the following:

  * An empty sequence.
  * The boolean value false.
  * An empty string ("").
  * A numeric value that is equal to zero.
  * The double or float value NaN.

  Otherwise, fn:boolean returns true.
  
  The effective boolean value of a sequence may be computed during 
  processing of the following types of expressions:

  * Logical expressions (and, or)
  * ...


* But then in Appendix F of the same document
[http://www.w3.org/TR/xpath20/#id-backwards-compatibility] 

  (...) In XPath 2.0, the rules depend on the context. In a function call, 
  or as an operand of the and and or operators (assuming fallback 
  conversions are used) the strings "0" and "false" are treated as false, 
  (...)

But according to the above rules, in the case of the 'and' and 'or' 
operators, shouldn't we take the effective boolean value of "0" and "false" 
and evaluate them as true? 

Please feel free to ask me any questions if this isn't clear,
Thanks very much for your help,
Caroline
  
-- 
Caroline Rioux, Software Engineer           +44-1865-203192
DecisionSoft Limited                        http://www.decisionsoft.com
XML Development and Services

Received on Wednesday, 5 February 2003 09:41:04 UTC