- From: George Cristian Bina <george@sync.ro>
- Date: Thu, 16 Sep 2004 11:06:14 +0300
- To: Xan Gregg <Xan.Gregg@jmp.com>
- CC: xmlschema-dev@w3.org
Hi Xan, > I hadn't noticed it and neither did any validator I tried. Xerces checks the UPA. In this case I guess you run into a Xerces bug. I traced the sample down to <?xml version="1.0" encoding="UTF-8"?> <xs:schema targetNamespace="http://www.example.com/test" xmlns="http://www.example.com/test" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="root"> <xs:complexType> <xs:sequence> <xs:element ref="Study" minOccurs="0" maxOccurs="unbounded"/> <xs:any namespace="##any" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="Study"/> <xs:element name="test"> <xs:complexType> <xs:sequence> <xs:any namespace="##other"/> </xs:sequence> </xs:complexType> </xs:element> </xs:schema> which is reported as valid BUT if the test element is removed or placed before the root element Xerces reports: SystemID: F:\test\test.xsd Location: 7:25 Description: E cos-nonambig: "http://www.example.com/test":Study and WC[##any] (or elements from their substitution group) violate "Unique Particle Attribution". During validation against this schema, ambiguity would be created for those two particles. URL: http://www.w3.org/TR/xmlschema-1/#cos-nonambig The problem seems to be related with ##other because if ##any is specified instead the error is reported. If you move the ODM element declaration from ODM1-2-0.xsd schema at the end of the schema file then Xerces will report: SystemID: http://www.cdisc.org/schema/ODM1-2-0.xsd Location: 1431:21 Description: E cos-nonambig: "http://www.w3.org/2000/09/xmldsig#":Signature and WC[##other:"http://www.cdisc.org/ns/odm/v1.2"] (or elements from their substitution group) violate "Unique Particle Attribution". During validation against this schema, ambiguity would be created for those two particles. URL: http://www.w3.org/TR/xmlschema-1/#cos-nonambig Best Regards, George ----------------------------------------------- George Cristian Bina <oXygen/> XML Editor & XSLT Editor/Debugger http://www.oxygenxml.com
Received on Thursday, 16 September 2004 08:04:18 UTC