Dear libxml2 developers, I'm trying to validate this document (doc.xml):
<?xml version="1.0"?>
<list>10 20</list>
against the attached XML schema (schema.xsd).
In short, the XML schema defines:
simpleType "IntegerList"
- a list (<xs:list>) of integers
complexType "IntegerListComplex"
- the complexType version of "IntegerList"
complexType "IntegerListComplexLength2"
- restricts "IntegerListComplex" to length 2
element <list>
- type "IntegerListComplexLength2"
A simple validation via:
xmllint --noout --schema schema.xsd doc.xml
fails with the message (edited for better readability):
schema.xsd:19:
element complexType:
Schemas parser error:
local list type:
A type, derived by list or union, must have
the simple ur-type definition as base type,
not '{http://my.example/schema}IntegerList'.
WXS schema schema.xsd failed to compile
This behaviour is identical in release 2.6.27 and in the
current SVN version.
The error message is thrown in xmlschemas.c, line 15092.
Is this a bug, or does the standard really prohibit this
construction? Should I file a bug report?
Greets,
Volker
--
Volker Grabsch
---<<(())>>---
Administrator
NotJustHosting GbR
doc.xml
Description: XML document
<?xml version="1.0"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="list" type="IntegerListComplexLength2"/> <xs:simpleType name="IntegerList"> <xs:list itemType="xs:integer"/> </xs:simpleType> <xs:complexType name="IntegerListComplex"> <xs:simpleContent> <xs:extension base="IntegerList"/> </xs:simpleContent> </xs:complexType> <xs:complexType name="IntegerListComplexLength2"> <xs:simpleContent> <xs:restriction base="IntegerListComplex"> <xs:length value="2"/> </xs:restriction> </xs:simpleContent> </xs:complexType> </xs:schema>
_______________________________________________ xml mailing list, project page http://xmlsoft.org/ [email protected] http://mail.gnome.org/mailman/listinfo/xml
