[Bug 2545] EBV (fn:boolean) and xs:anyURI

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





------- Additional Comments From frans.englich@telia.com  2005-11-21 16:42 -------
  
Whether the EBV extraction of xs:anyURI("example.org/") yields a type error or  
not, I think can be concluded like this:  
  
The argument type of fn:boolean is item()*. For this reason is no atomization 
or type promotion invoked, as according to the Function Conversion Rules in 
XPath20. Thus, the body of fn:boolean is passed an xs:anyURI instance, and  
according to fn:boolean's definition xs:anyURI are not EBV-extractable and 
hence yields an error.  
  
However:  
  
* Saxon accepts "<xsl:if test="xs:anyURI('example.org')">" and evaluates it to  
true, so this is an indication in another direction.  
* Type promotion, especially involving xs:anyURI, is vague in other areas as  
well. It looks like these are editorial bugs, not design problems or  
unconsidered aspects.  
 
It will be interesting to hear what the WG members say. If one looks on prior 
cases(such as #2324), it wouldn't surprise me if EBV extraction from xs:anyURI 
should be allowed. I wonder if it makes sense though for xs:anyURI. 
 
A similar case is: http://www.w3.org/Bugs/Public/show_bug.cgi?id=2324  
  
I agree clarification would be helpful. An example involving xs:anyURI and 
fn:boolean would likely settle all confusion. 
 
  
Cheers,  
Frans

Received on Monday, 21 November 2005 16:42:46 UTC