Behaviour change importing the XML namespace

<oXygen/> general issues.
Posts: 2
Joined: Thu Oct 13, 2005 10:36 pm

Behaviour change importing the XML namespace

Post by ksuderman » Fri Oct 14, 2005 12:09 am

I've stumbled across a change in the way <oXygen/> 6.2 handles importing the XML namespace. A skeleton set of schemas that illustrates the change can be found here. One schema (root.xsd) imports the XML namespace and uses schemaLocation="", the other schema (child.xsd) imports the XML namespace but uses a local copy of the xml.xsd file. Also, the local xml.xsd file is outdated and not exactly the same as the file on The root.xsd schema validates with <oXygen/> 6.0, Xerces-J 2.7.2, and XSV 2.10-1, but fails validation with <oXygen/> 6.2. Version 6.2 complains about multiple definitons of xml:lang, xml:base, and xml:specialAtts.

This is clearly an error in my schemas, but it never caused a problem in the past since most processors, including <oXygen/>, skip importing a namespace if that namespace has already been imported. I understand the spec is rather vague on this point, so I wouldn't call this a bug. But, I was wondering if this change was intentional or a side effect introduced with some other change?
In theory there is no difference between theory and practice, but in practice there is.

Posts: 4144
Joined: Fri Mar 28, 2003 2:12 pm

Post by sorin_ristache » Fri Oct 14, 2005 10:46 am


Starting from version 2.7.0 Xerces-J can load element / type definitions for a namespace from multiple schema files by enabling the feature ... aLocations. <oXygen/> 6.2 allows enabling and disabling the feature from Preferences - XML - XML Parser Options. When it is enabled the definition for xml:lang, xml:base etc is duplicated and validation fails. When it is disabled only the first schema file encountered for is parsed and you get no validation error.


Post Reply