Traceback (most recent call last):
File "test_xmltodict.py", line 64, in <module>
schema = xmlschema.XMLSchema('xacml-core-v3-schema-wd-17.xsd')
File "/Users/welkson/Envs/suap/lib/python2.7/site-packages/xmlschema/schema.py", line 195, in __init__
self.maps.build()
File "/Users/welkson/Envs/suap/lib/python2.7/site-packages/xmlschema/namespaces.py", line 343, in build
self.lookup_type(qname)
File "/Users/welkson/Envs/suap/lib/python2.7/site-packages/xmlschema/namespaces.py", line 199, in lookup
global_map[qname] = factory_or_class(elem, schema, is_global=True)
File "/Users/welkson/Envs/suap/lib/python2.7/site-packages/xmlschema/components/complex_types.py", line 48, in __init__
super(XsdComplexType, self).__init__(elem, schema, name, is_global)
File "/Users/welkson/Envs/suap/lib/python2.7/site-packages/xmlschema/components/component.py", line 45, in __init__
self.elem = elem
File "/Users/welkson/Envs/suap/lib/python2.7/site-packages/xmlschema/components/complex_types.py", line 68, in __setattr__
super(XsdComplexType, self).__setattr__(name, value)
File "/Users/welkson/Envs/suap/lib/python2.7/site-packages/xmlschema/components/component.py", line 61, in __setattr__
self._parse()
File "/Users/welkson/Envs/suap/lib/python2.7/site-packages/xmlschema/components/complex_types.py", line 128, in _parse
base_type = self._parse_base_type(derivation_elem, complex_content=True)
File "/Users/welkson/Envs/suap/lib/python2.7/site-packages/xmlschema/components/complex_types.py", line 161, in _parse_base_type
base_type = self.maps.lookup_type(base_qname)
File "/Users/welkson/Envs/suap/lib/python2.7/site-packages/xmlschema/namespaces.py", line 199, in lookup
global_map[qname] = factory_or_class(elem, schema, is_global=True)
File "/Users/welkson/Envs/suap/lib/python2.7/site-packages/xmlschema/components/complex_types.py", line 48, in __init__
super(XsdComplexType, self).__init__(elem, schema, name, is_global)
File "/Users/welkson/Envs/suap/lib/python2.7/site-packages/xmlschema/components/component.py", line 45, in __init__
self.elem = elem
File "/Users/welkson/Envs/suap/lib/python2.7/site-packages/xmlschema/components/complex_types.py", line 68, in __setattr__
super(XsdComplexType, self).__setattr__(name, value)
File "/Users/welkson/Envs/suap/lib/python2.7/site-packages/xmlschema/components/component.py", line 61, in __setattr__
self._parse()
File "/Users/welkson/Envs/suap/lib/python2.7/site-packages/xmlschema/components/complex_types.py", line 132, in _parse
self._parse_complex_content_extension(derivation_elem, base_type)
File "/Users/welkson/Envs/suap/lib/python2.7/site-packages/xmlschema/components/complex_types.py", line 289, in _parse_complex_content_extension
"extension group is not empty." % base_type.mixed, elem)
File "/Users/welkson/Envs/suap/lib/python2.7/site-packages/xmlschema/components/component.py", line 106, in _parse_error
raise error
xmlschema.exceptions.XMLSchemaParseError: base has a different content type (mixed=False) and the extension group is not empty.
<xs:extension xmlns:xs="http://www.w3.org/2001/XMLSchema" base="xacml:ExpressionType">
<xs:sequence>
<xs:any maxOccurs="unbounded" minOccurs="0" namespace="##any" processContents="lax" />
</xs:sequence>
<xs:attribute name="DataType" type="xs:anyURI" use="required" />
<xs:anyAttribute namespace="##any" processContents="lax" />
</xs:extension>
Hi @brunato
XSD Schema: https://docs.oasis-open.org/xacml/3.0/xacml-core-v3-schema-wd-17.xsd
Validation online (XSD Schema OK): http://www.utilities-online.info/xsdvalidation/#.Wa_0TBNSyF0
Using xmlschema lib (Python 2.7 / xmlschema 0.9.11):
Error:
Thanks in advance.