Return-Path: Delivered-To: apmail-db-jdo-dev-archive@www.apache.org Received: (qmail 44863 invoked from network); 14 Mar 2007 22:43:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Mar 2007 22:43:30 -0000 Received: (qmail 57737 invoked by uid 500); 14 Mar 2007 22:43:38 -0000 Mailing-List: contact jdo-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jdo-dev@db.apache.org Delivered-To: mailing list jdo-dev@db.apache.org Received: (qmail 57682 invoked by uid 99); 14 Mar 2007 22:43:38 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Mar 2007 15:43:38 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Mar 2007 15:43:29 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 83F41714078 for ; Wed, 14 Mar 2007 15:43:09 -0700 (PDT) Message-ID: <22308518.1173912189538.JavaMail.jira@brutus> Date: Wed, 14 Mar 2007 15:43:09 -0700 (PDT) From: "Ilan Kirsh (JIRA)" To: jdo-dev@db.apache.org Subject: [jira] Commented: (JDO-472) Cannot use JDO 2 xsd for XML validation In-Reply-To: <30972672.1173905949754.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/JDO-472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12480964 ] Ilan Kirsh commented on JDO-472: -------------------------------- Unfortunately I am getting the same problems now with DocumentBuilder. I tried also the 3 previous versions of the xsd - and the result is the same. I am using JDK 1.5.0_09. e.g. 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. at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236) at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:172) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:382) at com.sun.org.apache.xerces.internal.impl.xs.XSConstraints.reportSchemaError(XSConstraints.java:315) at com.sun.org.apache.xerces.internal.impl.xs.XSConstraints.fullSchemaChecking(XSConstraints.java:463) at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleEndElement(XMLSchemaValidator.java:2246) at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.endElement(XMLSchemaValidator.java:814) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanEndElement(XMLNSDocumentScannerImpl.java:719) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1685) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148) at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:250) at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:292) at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:98) > 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 > Fix For: JDO 2 final > > > 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? -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.