[xquery-talk] zero-length string namespaces URI
Ronald Bourret
rpbourret at rpbourret.com
Thu Sep 29 00:13:34 PDT 2005
I agree that such a clarification would be useful, but I believe it is
already explicitly disallowed.
Section 4.2 of the XQuery spec states:
"A module declaration begins with the keyword module and contains a
namespace prefix and a URILiteral. The URILiteral identifies the target
namespace of the library module..."
The Namespaces in XML 1.0 errata states:
NE09: The empty string, though it is a legal URI reference, cannot be
used as a namespace name.
Technically, the XQuery spec should use the term "namespace name"
instead of "namespace URI", but the meaning is clear.
-- Ron
Michael Kay wrote:
> I don't think this *should* be allowed; but I don't think the spec says
> clearly that it isn't.
>
> The zero-length string is not a valid namespace URI, though it is used in
> some contexts (e.g. xmlns="") to indicate the "not-a-namespace" (for want of
> a better term). I think the spec needs to say explicitly that this isn't
> allowed. Could you please raise it on http://www.w3.org/Bugs/Public/ ?
>
> Michael Kay
>
>
>>-----Original Message-----
>>From: talk-bounces at xquery.com
>>[mailto:talk-bounces at xquery.com] On Behalf Of Pierrick Brihaye
>>Sent: 28 September 2005 08:06
>>To: talk at xquery.com
>>Subject: [xquery-talk] zero-length string namespaces URI
>>
>>Hi,
>>
>>Is this syntax correct ?
>>
>>module.txt :
>>
>>module namespace foo="";
>>declare variable $foo:bar := "bar";
>>
>>XQuery :
>>
>>import module namespace foo="" at "module.txt";
>>$foo:bar
>>
>>or XQuery :
>>
>>import module namespace foo="" at "module.txt";
>>$bar
>>
>>Saxon returns "bar" in both cases.
More information about the talk
mailing list