Yes, you're right, on this path and on most others (the notable exception being the one I tested...) Saxon is treating an xs:anyURI as a string.
Michael Kay

From: [] On Behalf Of Frans Englich
Sent: 21 November 2005 17:51
Subject: [saxon] Re: [Bug 2545] EBV (fn:boolean) and xs:anyURI

On Monday 21 November 2005 17:19, you wrote:


> ------- Additional Comments From 2005-11-21 17:19

> ------- I think there's no doubt that in the current specs it's a type

> error to get the EBV of an xs:anyURI value. I don't feel strongly either

> way about changing it.


> Contrary to what Frans reports, Saxon 8.6 does report this error on xsl:if

> - though only at run-time (the static type checking can't yet handle a

> required type of this complexity)

Ok. Here's a double check then. For the following stylesheet:

<xsl:stylesheet version="2.0"



<xsl:template match="/" >

<xsl:if test="xs:anyURI('')">

Evaluated to TRUE




I get:


Saxon 8.6 from Saxonica

Java version 1.4.2_04

Stylesheet compilation time: 650 milliseconds

Processing file:/mnt/data/src/saxon8.6/i.xml

Building tree for file:/mnt/data/src/saxon8.6/i.xml using class net.sf.saxon.tinytree.TinyBuilder

Tree built in 5 milliseconds

Tree size: 4 nodes, 7 characters, 0 attributes

<?xml version="1.0" encoding="UTF-8"?>

Evaluated to TRUE

Execution time: 97 milliseconds

Memory used: 806768

NamePool contents: 11 entries in 11 chains. 8 prefixes, 8 URIs


The transform was invoked with "java -jar saxon8.jar -t i.xml code2.xsl", and "i.xml" contained "<input xmlns:foo="">content</input>".

Clarification appreciated.