  | |  | Created: (XERCESJ-1215) Restrictions involving two levels of substitution | Created: (XERCESJ-1215) Restrictions involving two levels of substitution 2006-11-22 - By Eric van der Vlist (JIRA)
Restrictions involving two levels of substitution groups raise false errors ---------------------------------------------------------------------------
Key: XERCESJ-1215 URL: http://issues.apache.org/jira/browse/XERCESJ-1215 Project: Xerces2-J Issue Type: Bug Components: XML Schema Structures Affects Versions: 2.8.1 Reporter: Eric van der Vlist
The following schema:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="head" type="xs:token"/>
<xs:element name="subHead" type="xs:token" substitutionGroup="head"/>
<xs:element name="subMember" type="xs:token" substitutionGroup="subHead"/>
<xs:complexType name="baseType"> <xs:sequence> <xs:element ref="head"/> </xs:sequence> </xs:complexType>
<xs:complexType name="restrictionType"> <xs:complexContent> <xs:restriction base="baseType"> <xs:sequence> <xs:element ref="subHead"/> </xs:sequence> </xs:restriction> </xs:complexContent> </xs:complexType>
</xs:schema>
Raises the following errors:
SystemID: /home/vdv/wadi/repro1.xsd Endroit: 21:42 Description: rcase-RecurseLax.2: There is not a complete functional mapping between the particles. URL: http://www.w3.org/TR/xmlschema-1/#rcase-RecurseLax
SystemID: /home/vdv/wadi/repro1.xsd Endroit: 21:42 Description: derivation-ok-restriction.5.4.2: Error for type 'restrictionType'. The particle of the type is not a valid restriction of the particle of the base. URL: http://www.w3.org/TR/xmlschema-1/#derivation-ok-restriction
Note that this functionnaly equivalent schema:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="head" type="xs:token"/>
<xs:element name="subHead" type="xs:token" substitutionGroup="head"/>
<xs:element name="subMember" type="xs:token" substitutionGroup="head"/>
<xs:complexType name="baseType"> <xs:sequence> <xs:element ref="head"/> </xs:sequence> </xs:complexType>
<xs:complexType name="restrictionType"> <xs:complexContent> <xs:restriction base="baseType"> <xs:sequence> <xs:choice> <xs:element ref="subHead"/> <xs:element ref="subMember"/> </xs:choice> </xs:sequence> </xs:restriction> </xs:complexContent> </xs:complexType>
</xs:schema>
Is considered valid.
Thanks,
Eric
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http:/ /issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
--------------------------------------------------------------------- To unsubscribe, e-mail: j-dev-unsubscribe@(protected) For additional commands, e-mail: j-dev-help@(protected)
|
|
 |