build problem caused by xmlns validation

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

build problem caused by xmlns validation

Hallvord Reiar Michaelsen Steen-3

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".

BUILD FAILED
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

Reply | Threaded
Open this post in threaded view
|

Re: build problem caused by xmlns validation

Curt Arnold-2


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".
>
> BUILD FAILED
> 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.

Reply | Threaded
Open this post in threaded view
|

Re: build problem caused by xmlns validation

Hallvord Reiar Michaelsen Steen-3

On Sat, 30 Jun 2007 06:55:03 +0200, Curt Arnold <[hidden email]>  
wrote:

>> ant dom2-core-gen-jsunit
>>
>> fails with this error message:
>> 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".
<X>
>> 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>

> 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.

Right, so the spec contains sample code that is made invalid by an errata  
:-(

> 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.

I've got Ant 1.7.0, I'm not entirely sure where to find other relevant  
version information but there is a file called libraries.properties where  
these entries look relevant:

xerces.version=2.8.1
xercesImpl.version=${xerces.version}
#should be in sync w/ xerces, but not in the maven repository
#xmlParserAPIs.version=${xerces.version}
xmlParserAPIs.version=2.6.1
xalan.version=2.7.0
xml-resolver.version=1.1

Is that what you need?

--
Hallvord R. M. Steen
Core QA JavaScript tester, Opera Software
http://www.opera.com/
Opera - simply the best Internet experience

Reply | Threaded
Open this post in threaded view
|

Re: build problem caused by xmlns validation

Hallvord Reiar Michaelsen Steen-3

On Tue, 03 Jul 2007 11:41:01 +0200, Hallvord R. M. Steen  
<[hidden email]> wrote:

>>> ant dom2-core-gen-jsunit
>>> fails with this error message:
>>> 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".
> <X>
>>> 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>

Hi,
running into this problem again - still trying to build and use the test  
suite. I have an updated build.xml file with an extra task to sort this  
out - interested?

>> 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.

>> 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.
>
> I've got Ant 1.7.0, I'm not entirely sure where to find other relevant  
> version information but there is a file called libraries.properties  
> where these entries look relevant:
>
> xerces.version=2.8.1
> xercesImpl.version=${xerces.version}
> #should be in sync w/ xerces, but not in the maven repository
> #xmlParserAPIs.version=${xerces.version}
> xmlParserAPIs.version=2.6.1
> xalan.version=2.7.0
> xml-resolver.version=1.1
>
> Is that what you need?
>



--
Hallvord R. M. Steen
Core QA JavaScript tester, Opera Software
http://www.opera.com/
Opera - simply the best Internet experience