[xsd-users] xerces validation problem
Klima Georg
G.Klima at durst-online.at
Wed Jul 10 08:17:15 EDT 2013
Hi all,
I do have a strange problem when compiling with XSD and it seems that its cause is located in xerces-c.
The error message:
ERROR: element 'Print' has type that does not derive from type of corresponding element in the base
-----------------------------------------------------------------------------------------
- The part where the error manifests itself -
-----------------------------------------------------------------------------------------
<xs:complexType name="PrinterComponent_at" abstract="true" >
<xs:sequence>
<xs:element name="Print" type="durst:PrintPrimitive_at" minOccurs="1" maxOccurs="unbounded"/>
</xs:sequence>
<!--xs:attributeGroup ref="durst:ComponentAddr_attr"/-->
</xs:complexType>
<xs:complexType name="SlotBase_at" abstract="true" >
<xs:complexContent>
<xs:extension base="durst:PrinterComponent_at">
<xs:sequence/>
<!--xs:attributeGroup ref="durst:SlotAddr_attr"/-->
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="SlotUnrestricted_vt" > <!--The error source line-->
<xs:complexContent>
<xs:restriction base="durst:SlotBase_at">
<xs:sequence>
<xs:element name="Print" type="durst:SlotPrintPrimitive_at" minOccurs="1" maxOccurs="unbounded"/>
</xs:sequence>
</xs:restriction>
</xs:complexContent>
</xs:complexType>
-----------------------------------------------------------------------------------------
- The corresponding type defs -
-----------------------------------------------------------------------------------------
<xs:complexType name="PrintPrimitive_at" abstract="true"/>
<xs:complexType name="SlotPrintPrimitive_at" abstract="true">
<xs:complexContent>
<xs:extension base="durst:PrintPrimitive_at">
<xs:attribute name="x" use="optional" type="xs:int"/>
<xs:attribute name="yIdx" use="optional" type="xs:int"/>
<xs:attribute name="xSize" use="optional" type="xs:int"/>
<xs:attribute name="yNozzles" use="optional" type="xs:int"/>
<xs:attribute name="xGap" use="optional" type="xs:int" default="-1"/>
<xs:attribute name="yNozzleGap" use="optional" type="xs:int" default="-1"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
As one could see, SlotPrintPrimitive_at is a direct descendant of PrintPrimitive_at.
libxml (xmllint) and qt (xmlpatternsvalidator) perfectly accept this construct. - Who is wrong?
Tested xerces-c with PParse -f -s -n XML-File and the error as stated above is printed to console.
What can I do? - Any help is appreciated!
XSD: 3.3.0
XERCES-C: 3.1.1
Mit freundlichen Grüßen / Best regards
-------------------------------------------
Georg Klima
Software Development
Durst Phototechnik Digital Technology GmbH
Julius-Durst-Straße 11
9900 Lienz
Tel.: +43 (0) 4852 71777 612
Fax: +43 (0) 4852 71777 50
eMail: G.Klima at durst-online.at
Visit us on http://www.durst-online.com
Firmenbuchnummer FN 169731f
Firmenbuchgericht: Landesgericht Innsbruck
UID: ATU44640705
Please consider the environment before printing this email.
-------------------------------------------
More information about the xsd-users
mailing list