I defined the ComplexType bellow :
<xs:element name="abstractForm" type="abstractFormType" abstract="true"/>
<xs:complexType name="abstractFormType" abstract="true">
<xs:sequence>
<xs:any minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="id-form" type="xs:NCName"/>
<xs:attribute name="select"/>
<xs:anyAttribute/>
</xs:complexType>
But after that in the code, every time I add a ComplexType I have this error : derivation-ok-restriction : The particle of the type is not a valid restriction of the particle of the base.
Exemple :
<xs:element name="abstractNewForm" type="abstractNewFormType" abstract="true"
substitutionGroup="abstractForm"/>
<xs:complexType name="abstractNewFormType" abstract="true">
<xs:complexContent>
<xs:restriction base="abstractFormType">
<xs:sequence>
<xs:sequence>
<xs:element name="customize" minOccurs="0" type="abstractCustomizeType"/>
</xs:sequence>
<xs:sequence>
<xs:element name="positions" minOccurs="0" type="abstractPositionsType"/>
</xs:sequence>
</xs:sequence>
<xs:attribute name="id-form" type="xs:NCName" use="required"/>
<xs:attribute name="select"/>
<xs:anyAttribute/>
</xs:restriction>
</xs:complexContent>
</xs:complexType>
Someone has an idea ? :)
Saxon accepts this as a valid restriction, but with a warning:
Remember that xs:any defaults to processContents="strict", meaning that the only elements that can appear here are elements that have a global declaration in the schema. And since "customise" and "positions" don't have global declarations, they don't satisfy this condition. I would have to do some research to work out why Saxon puts this out as a warning rather than an error. Whatever schema processor you are using, it has taken a different interpretation. Mind you, Saxon tests subsumption the XSD 1.1 way, even if XSD 1.1 is not enabled, because there are bugs in the XSD 1.0 spec in this area: but some processors have chosen to be strictly conformant, and implement it bugs and all.
I would recommend making "customise" and "positions" into global element declarations.