Re: modules binding the xml/xmlns prefix

Frans Englich wrote:
> On Monday 27 February 2006 17:11, Jonathan Robie wrote:
>   
>> Frans Englich wrote:
>>     
>>> Hi everyone,
>>>
>>> 4.12 Namespace Declaration specifies that it is not allowed to redeclare
>>> the xml and xmlns prefix(XQST0070).
>>>
>>> A module declaration also allows an namespace binding to be done: "In the
>>> statically known namespaces of the library module, the namespace prefix
>>> specified in the module declaration is bound to the module's target
>>> namespace".
>>>
>>> I don't see what makes it invalid to do for example "module namespace xml
>>> = 'example.org/ns';".
>>>
>>> What have I missed? Or already taken care of? I'll probably file a report
>>> otherwise.
>>>
>>>
>>> Regards,
>>>
>>> 		Frans
>>>       
>> Hi Frans,
>>
>> These prefixes are reserved in the XML namespaces spec:
>>
>> http://www.w3.org/TR/2004/REC-xml-names11-20040204/#xmlReserved
>>
>> Since  "module namespace xml ='example.org/ns';" binds xml to a
>> different prefix, it seems inconsistent with the philosophy advocated by
>> the XML namespaces rec.
>>     
>
> Yes, I agree it makes no sense to redeclare them. What I wonder is /where/ in 
> the XQuery specification it is said that a 'module namespace' can't redeclare 
> them. For example, for the 'declare namespace' declaration it is explicitly 
> noted that attempted redeclarations of the xml/xmlns attributes raises 
> XQST0070 -- but where can a similar clause be found for 'module namespace'?
>
> In other words, where does it say in XQuery 1.0 that "declare namespace xml = 
> 'example.org/ns';" is an error, and what the error code is?
>   

I apologize for the misunderstanding - I think we say this clearly in 
"4.12 Namespace Declaration", but in several other parts of our spec 
where we create namespace bindings, we do not refer to section 4.12, and 
do not state that the same error conditions apply. This does look like a 
bug that should be fixed, and I think you should enter it into Bugzilla.

Jonathan

-- 
Read my Blog: http://blogs.datadirect.com/jonathan_robie/
Learn XQuery: http://media.datadirect.com/download/docs/ddxquery/tutorial_query.html
Learn XQJ (the JDBC for XQuery): http://www.datadirect.com/developer/xquery/topics/xqj_tutorial/
Get DataDirect XQuery: http://www.datadirect.com/products/xquery/

Received on Monday, 27 February 2006 17:31:22 UTC