Apache JDO Project - [jira] Commented: (JDO-472) Cannot use JDO 2 xsd for XML validation

This is Interesting: Free IT Magazines  
Home > Archive > Apache JDO Project > May 2007 > [jira] Commented: (JDO-472) Cannot use JDO 2 xsd for XML validation





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author [jira] Commented: (JDO-472) Cannot use JDO 2 xsd for XML validation
Craig Russell (JIRA)

2007-05-30, 1:11 pm


[ https://issues.apache.org/jira/brow...action_12500126 ]

Craig Russell commented on JDO-472:
-----------------------------------

I've reviewed the patch and it looks very good.

The patch doesn't remove or rename the existing 2.0 xsd files, and I agree that we should leave the 2.0 xsd files as they are, just adding the 2.1 xsd files.

I agree that there is no reason to add a 2.1 version of the dtd files unless (and until) we make some changes to the contents.




> Cannot use JDO 2 xsd for XML validation
> ---------------------------------------
>
> Key: JDO-472
> URL: https://issues.apache.org/jira/browse/JDO-472
> Project: JDO
> Issue Type: Bug
> Affects Versions: JDO 2 final
> Reporter: Ilan Kirsh
> Assignee: Michael Bouschen
> Fix For: JDO 2 maintenance release 1
>
> Attachments: JDO472-mbo-070527.patch, xsd-test.zip
>
>
> 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 t

his 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 do

cument '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?


--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com