Issue Details (XML | Word | Printable)

Key: JDO-472
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Michael Bouschen
Reporter: Ilan Kirsh
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
JDO

Cannot use JDO 2 xsd for XML validation

Created: 14/Mar/07 08:57 PM   Updated: 31/May/07 08:19 PM
Return to search
Component/s: None
Affects Version/s: JDO 2 final
Fix Version/s: JDO 2 maintenance release 1

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works JDO472-mbo-070527.patch 2007-05-27 07:32 PM Michael Bouschen 111 kB
Zip Archive Licensed for inclusion in ASF works xsd-test.zip 2007-03-15 08:07 PM Ilan Kirsh 5 kB

Resolution Date: 31/May/07 08:19 PM


 Description  « Hide
I am trying to use the last JDO 2.0 xsd with:

SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
URL xsdURL = getClass().getResource("/jdo_2.0.xsd");
Schema schema = factory.newSchema(xsdURL);

First I got the following exception (from newSchema):

org.xml.sax.SAXParseException: cos-nonambig: "http://java.sun.com/xml/ns/jdo/jdo":extension and "http://java.sun.com/xml/ns/jdo/jdo":extension (or elements from their substitution group) violate "Unique Particle Attribution". During validation against this schema, ambiguity would be created for those two particles.

And after trying to fix it, I got the following exception (from newSchema):

org.xml.sax.SAXParseException: src-resolve.4.2: Error resolving component 'xs:attlist.jdo'. It was detected that 'xs:attlist.jdo' is in namespace 'http://www.w3.org/2001/XMLSchema', but components from this namespace are not referenceable from schema document 'file:/D:/odb/dv/rt/class/jdo.xsd'. If this is the incorrect namespace, perhaps the prefix of 'xs:attlist.jdo' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:/D:/odb/dv/rt/class/jdo.xsd'.

The same 3 lines work well with JPA 1.0 xsd. Has anyone used JDO 2.0 xsd successfully already?


 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Ilan Kirsh made changes - 15/Mar/07 08:07 PM
Field Original Value New Value
Attachment xsd-test.zip [ 12353432 ]
Michael Bouschen made changes - 18/May/07 04:50 PM
Fix Version/s JDO 2 final [ 12310830 ]
Fix Version/s JDO 2 maintenance release 1 [ 12310923 ]
Assignee Michael Bouschen [ mbo ]
Michael Bouschen made changes - 27/May/07 07:32 PM
Attachment JDO472-mbo-070527.patch [ 12358338 ]
Michael Bouschen made changes - 31/May/07 08:19 PM
Resolution Fixed [ 1 ]
Status Open [ 1 ] Resolved [ 5 ]