W3C home > Mailing lists > Public > www-dom-ts@w3.org > June 2007

Re: build problem caused by xmlns validation

From: Curt Arnold <carnold@houston.rr.com>
Date: Fri, 29 Jun 2007 23:55:03 -0500
Message-Id: <4B022323-CC49-444E-9387-4D1FEBA318A9@houston.rr.com>
Cc: "Hallvord R. M. Steen" <hallvord@opera.com>
To: www-dom-ts@w3.org

On Jun 29, 2007, at 8:18 AM, Hallvord R. M. Steen wrote:

> Hi,
> I checked out the DOM test suites from the W3 CVS today - don't  
> know how actively updated they are but at least my version should  
> be current ;) - but the build invoked with
> ant dom2-core-gen-jsunit
> fails with this error message:
> [xmlvalidate] D:\testsuites\w3.org\2001\DOM-Test-Suite\build\dom2- 
> interfaces.xml:2228:183: The prefix "xml" cannot be bound to any  
> namespace other than its usual namespace; neither can the namespace  
> for "xml" be bound to any prefix other than "xml".
> D:\testsuites\w3.org\2001\DOM-Test-Suite\build.xml:1530: Could not  
> validate document D:\testsuites\w3.org\2001\DOM-Test-Suite\build 
> \dom2-interfaces.xml
> Caused by the xmlns:ns0 in demo code like the following:
> <p>Returns the UTF-32 offset corresponding to a UTF-16 offset. Used  
> for random access. To find the UTF-32 length of a string, use:<eg  
> xmlns:ns0="http://www.w3.org/XML/1998/namespace"  
> ns0:space="preserve">len32 = findOffset32(source, source.length 
> ());</eg>
> I can fix this by changing all (3) instances to e.g.
> xmlns:ns0="http://www.w3.org/XML/1998/namespace0"
> But perhaps it could be fixed at source?
> -- 
> Hallvord R. M. Steen
> Core QA JavaScript tester, Opera Software
> http://www.opera.com/
> Opera - simply the best Internet experience

I'm not aware of any recent activity on the test suites.  I know I  
haven't been in them for quite some time.

The constraint that the XML namespace URL not be bound to a different  
prefix was not in the original 1999 XML Namespaces recommendation but  
was added in an errata (http://www.w3.org/XML/xml-names-19990114- 
errata#NE05, date uncertain) and is in the recent second edition.   
Apparently, that constraint was not enforced in the XML parsers in  
use at the type of the development of the test suite.  I haven't  
located the ultimate source of the offense, but from the Ant failure  
it appears that the XML source for the DOM L2 Core Specification (and  
not a test) violates that constraint.  Since that spec is unlikely to  
change, the best approach would be to have the build tweak its copy  
to the DOM L2 Core spec so that it is namespace valid.

The issue could be avoided by using an earlier XML parser, either  
using Ant 1.6.5 or JDK 1.4 or a combination should avoid the issue.   
The test suites had been built nightly on Apache Gump until recently  
when it was removed due to capacity constraints and I do not recall  
this issue appearing.   It would be great if you could identify more  
of your build environment particularly the default JAXP parser, so I  
don't have to hunt for a configuration that runs into the problem.
Received on Saturday, 30 June 2007 04:55:23 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:34:08 UTC