John M. Dlugosz wrote: > I found a construct that gets a clean bill of health using xsdvalid (command > line) but is rejected by other validators. > > Here is a fragment of my file: > > <xs:complexType name="element_list_t"> > <xs:choice> > <xs:group ref="standard_elements_g" /> > <xs:sequence> > <xs:element name= "nonconforming_elements" minOccurs="0"> > <xs:complexType> > <xs:sequence> > <xs:element name="nonconforming_element" minOccurs="0" > maxOccurs="unbounded" type="bad_element_t"/> > </xs:sequence> > </xs:complexType> > </xs:element> > <xs:element name= "nonconforming_private_elements" minOccurs="0" /> > <xs:element name= "private_elements" minOccurs="0" /> > <xs:element name="standard_elements" type="standard_elements_t" > minOccurs="0" /> > </xs:sequence> > </xs:choice> > <xs:attribute name="IOD"> > <xs:simpleType> > <xs:list> > <xs:simpleType> > <xs:restriction base="xs:token"> > <xs:pattern value="[0-9]+(\.[0-9]+)*|partial|superset" /> > </xs:restriction> > </xs:simpleType> > </xs:list> > </xs:simpleType> > </xs:attribute> > </xs:complexType> > > Basically, the <choice> contains a <group ref>, and that group being > referenced (which happens to be in an included file) begins with: > > <xs:group name="standard_elements_g"> > <xs:all> > > Since an <all> can only be on the top level, and going through groups doesn't > change that, I think your tool is wrong for permitting it.
We'll try to fix this ``bug'' in next release (an undocumented limitation in fact). However you'll probably find *dozens* of such problems. The goal of xsdvalid is not to create a top notch W3C XML schema validator. The goal of xsdvalid is just to help evaluating XMLmind XML Editor: if xsdvalid cannot load your schema, then XMLmind XML Editor will not be able to cope with your schema. Therefore, you, as an evaluator, would better choose another XML editor. For us, validating instances against W3C XML schemas is *much* more important than validating the schema. We assume that a W3C XML Schema author has validated its schema against 2 or 3 different validators (given the atrocious complexity of the W3C recommendation) before loading an instance in XXE. For example, the last bug you have submitted (not handling the case where the refer child of a keyref is naming a <unique> rather than a <key>) was considered by us to be a very serious one. (It is fixed now.) --- PS: Why not just use Xerces like all the others? * Xerces is *huge*. * At the time we needed an XML schema engine, Xerces (1.x) was a very bad XML parser and a very bad XML schema engine. * XMLmind XML Editor requires a quick, incremental, instance validator and we didn't see how to do this with the Xerces code base. (In contrast, we figured out how to do this with Xing, James Clark's RELAX NG Schema validator.)

