Namespaces in XML 1.x test suite contribution

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Namespaces in XML 1.x test suite contribution

Bjoern Hoehrmann

Dear XML Core Working Group,

  I'm pleased to contribute the following test documents to the XML test
suite:

  * <xml:foo/>
  * <xmlns:foo/>
  * <foo xmlns='http://www.w3.org/XML/1998/namespace'/>
  * <foo xmlns='http://www.w3.org/2000/xmlns/'/>

I'm happy to use http://www.w3.org/2002/09/wbs/1/testgrants2-200409/ to
grant license to use these test cases to W3C if the Working Group feels
that might be necessary... All tests are namespace well-formed, yet many
implementations assume that some are not or behave in strange ways when
processing them; the relevant errata documents should be updated to
remove any doubts relative to this matter.

Thanks,
--
Björn Höhrmann · mailto:[hidden email] · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 

Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Namespaces in XML 1.x test suite contribution

Richard Tobin-2

>   I'm pleased to contribute the following test documents to the XML test
> suite:

Presumably that's not what you really mean.

>   * <xml:foo/>

This document is uncontroversial I think.  The document is well-formed
but uses a reserved element name, which is unwise.

>   * <xmlns:foo/>

http://www.w3.org/XML/xml-names-19990114-errata#NE05 says:

  The prefix xmlns is used only to declare namespace bindings

(and Namespaces 1.1 says the same).  This should be changed to use "MUST".


>   * <foo xmlns='http://www.w3.org/XML/1998/namespace'/>
>   * <foo xmlns='http://www.w3.org/2000/xmlns/'/>

NE05 should be changed to add to disallow the use of these namespace
names as the default namespace.

-- Richard

Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Namespaces in XML 1.x test suite contribution

Bjoern Hoehrmann

* Richard Tobin wrote:
>>   I'm pleased to contribute the following test documents to the XML test
>> suite:
>
>Presumably that's not what you really mean.

I do think the test suite should have such tests, yes.

  * <?xml version="1.1"?><foo xmlns:xmlns=""/>
  * <?xml version="1.1"?><foo xmlns:xml=""/>

Would make good additions aswell.
--
Björn Höhrmann · mailto:[hidden email] · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 

Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Namespaces in XML 1.x test suite contribution

Bjoern Hoehrmann
In reply to this post by Richard Tobin-2

* Richard Tobin wrote:
>>   * <xmlns:foo/>
>
>http://www.w3.org/XML/xml-names-19990114-errata#NE05 says:
>
>  The prefix xmlns is used only to declare namespace bindings
>
>(and Namespaces 1.1 says the same).  This should be changed to use "MUST".

I note that DOM implementations do not raise a NAMESPACE_ERR exception
for .createElementNS('http://www.w3.org/2000/xmlns/', 'xmlns:foo') or
for .createElementNS('http://www.w3.org/2000/xmlns/', 'xmlns'). If such
a change is made to the namespaces recommendations DOM Level 3 Core
should be updated accordingly (it either must not allow creation of such
elements or the namespace fixup algorithm must report an error if the
tree includes such an element). There may be similar problems in other
specifications.
--
Björn Höhrmann · mailto:[hidden email] · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 

Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Namespaces in XML 1.x test suite contribution

Richard Tobin-2
In reply to this post by Bjoern Hoehrmann

> >>   I'm pleased to contribute the following test documents to the XML test
> >> suite:
> >
> >Presumably that's not what you really mean.
>
> I do think the test suite should have such tests, yes.

Oh, I agree, but they should (except the first one) be marked as
namespace well-formed.

>   * <?xml version="1.1"?><foo xmlns:xmlns=""/>
>   * <?xml version="1.1"?><foo xmlns:xml=""/>

Yes these would make good tests too.

-- Richard

Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Namespaces in XML 1.x test suite contribution

Henry S. Thompson
In reply to this post by Richard Tobin-2
Richard Tobin writes [nearly 8 years ago!]:

> Bjoern Hoehrmann wrote
>>   I'm pleased to contribute the following test documents to the XML test
>> suite:
>
> Presumably that's not what you really mean.
>
>>   * <xml:foo/>
>
> This document is uncontroversial I think.  The document is well-formed
> but uses a reserved element name, which is unwise.
>
>>   * <xmlns:foo/>
>
> http://www.w3.org/XML/xml-names-19990114-errata#NE05 says:
>
>   The prefix xmlns is used only to declare namespace bindings
>
> (and Namespaces 1.1 says the same).  This should be changed to use "MUST".
>
>
>>   * <foo xmlns='http://www.w3.org/XML/1998/namespace'/>
>>   * <foo xmlns='http://www.w3.org/2000/xmlns/'/>
>
> NE05 should be changed to add to disallow the use of these namespace
> names as the default namespace.

The last three of these tests were in fact added to the testsuite in
the 2008 releases [1].

I'm in the process of going through all outstanding suggestions for
the Test Suite, and will be doing a new release soon, which will also
include the first test suggested above (as well as a similar one with
an attribute named xml:foo).

ht

[1] http://www.w3.org/XML/Test/#releases
--
       Henry S. Thompson, School of Informatics, University of Edinburgh
      10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
                Fax: (44) 131 650-4587, e-mail: [hidden email]
                       URL: http://www.ltg.ed.ac.uk/~ht/
 [mail from me _always_ has a .sig like this -- mail without it is forged spam]

Loading...