Re: [xsl] xs:anyURI allows a space

Subject: Re: [xsl] xs:anyURI allows a space
From: "Andrew Welch" <andrew.j.welch@xxxxxxxxx>
Date: Mon, 16 Jul 2007 15:42:21 +0100
On 7/16/07, Colin Adams <colinpauladams@xxxxxxxxxxx> wrote:

>From: "Andrew Welch" <andrew.j.welch@xxxxxxxxx>


>What is it that xs:anyURI allows a space?

Does it? I dont think that is right.

xs:URI is for IRIs, which dont allow a space.

I don't know why I wrote "what" instead of "why"... probably going mad.


Anyway, read the note here: http://www.w3.org/TR/xmlschema-2/#anyURI

"Note:  Spaces are, in principle, allowed in the 7lexical space7 of
anyURI, however, their use is highly discouraged (unless they are
encoded by %20)."

and a quick sanity check:

<xsl:sequence select="xs:anyURI('the file.xml')"/>

returns

"the file.xml" (using Saxon 8.9.0.4)

whereas new URI("the file.xml") in Java 1.6 causes a URISyntaxException.



--
http://andrewjwelch.com

Current Thread