Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.7.0
-
None
Description
Hi there,
xerces-c reports "Base type definition does not have any attributes" for a valid complex type restriction.
This bug appears only if we have a element recursion and the attributes are explicitly defined in the restricted type definition.
sample schema:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xs:complexType name="A">
<xs:sequence>
<xs:element name="elem" type="B" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="foo"/>
</xs:complexType>
<xs:complexType name="B">
<xs:sequence>
<xs:element name="elem" type="C" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="C">
<xs:complexContent>
<xs:restriction base="D">
<xs:attribute name="foo"/>
</xs:restriction>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="D">
<xs:complexContent>
<xs:restriction base="A">
<xs:attribute name="foo"/>
</xs:restriction>
</xs:complexContent>
</xs:complexType>
</xs:schema>
Cheers,
Christian Will