[OAI-implementers] OAI 2.0 schema and Xerces 2.2.0

Naomi Dushay Naomi@cs.cornell.edu
Tue, 8 Oct 2002 16:12:56 -0400


There is a problem with schema validation of oai_dc for 2.0:

	http://www.openarchives.org/OAI/2.0/oai_dc.xsd

and Xerces 2.2.0.  It really is a problem with the included schema:

	http://dublincore.org/schemas/xmls/simpledc20020312.xsd

as I reported to DC-Architecture in the message below.

Earlier versions of Xerces don't seem to complain.


Thanks to John Weatherley at DLESE for finding this.

- Naomi


-----Original Message-----
From: Naomi Dushay 
Sent: Tuesday, October 08, 2002 4:04 PM
To: 'DCMI Architecture Group'
Cc: Carl Lagoze; Diane Hillmann
Subject: problem with simple dc schema


Xerces 2.2.0 does not like the schema at

	http://dublincore.org/schemas/xmls/simpledc20020312.xsd


The issue is that Xerces 2.2.0 complains if you assign a namespace prefix to the XML namespace URI: http://www.w3.org/XML/1998/namespace   (though it is still fine to import it.)   This behavior is currently peculiar to Xerces 2.2.0 ... but I'm not sure if Xerces 2.2.0 is right or wrong in it's complaint.


This could be fixed if the "x" namespace declaration was removed (leave the import), and references to it used the "xml" prefix instead:

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:x="http://www.w3.org/XML/1998/namespace" xmlns="http://purl.org/dc/elements/1.1/" targetNamespace="http://purl.org/dc/elements/1.1/" elementFormDefault="qualified" attributeFormDefault="unqualified">

becomes

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://purl.org/dc/elements/1.1/" targetNamespace="http://purl.org/dc/elements/1.1/" elementFormDefault="qualified" attributeFormDefault="unqualified">


and 

<xs:complexType name="elementType">
- <xs:simpleContent>
- <xs:extension base="xs:string">
  <xs:attribute ref="x:lang" use="optional" /> 
  </xs:extension>
  </xs:simpleContent>
  </xs:complexType>

becomes

<xs:complexType name="elementType">
  <xs:simpleContent>
  <xs:extension base="xs:string">
  <xs:attribute ref="xml:lang" use="optional" /> 
  </xs:extension>
  </xs:simpleContent>
  </xs:complexType>

- Naomi