E rcase-RecurseLax.1 Group's range, (1,unbounded), ...
Posted: Sun Feb 12, 2006 10:45 pm
This is my schema:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://www.ubs.com/namespace/wbml-render" xmlns="http://www.ubs.com/namespace/wbml-render" xmlns:wbr="http://www.ubs.com/namespace/wbml-render">
<xs:element name="a" type="xs:string"/>
<xs:element name="a1" type="xs:string"/>
<xs:element name="a2" type="xs:string"/>
<xs:element name="a3" type="xs:string"/>
<xs:element name="b" type="xs:integer"/>
<xs:group name="a-Group">
<xs:choice>
<xs:element ref="a1"/>
<xs:element ref="a2"/>
<xs:element ref="a3"/>
</xs:choice>
</xs:group>
<xs:complexType name="groupBaseType">
<xs:choice>
<xs:group ref="a-Group" maxOccurs="unbounded"/>
<xs:element ref="b"/>
</xs:choice>
</xs:complexType>
<xs:complexType name="groupRestrictedType">
<xs:complexContent>
<xs:restriction base="groupBaseType">
<xs:choice>
<xs:group ref="a-Group" maxOccurs="unbounded"/>
</xs:choice>
</xs:restriction>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="baseType">
<xs:choice>
<xs:element ref="a" maxOccurs="unbounded"/>
<xs:element ref="b"/>
</xs:choice>
</xs:complexType>
<xs:complexType name="restrictedType">
<xs:complexContent>
<xs:restriction base="baseType">
<xs:choice>
<xs:element ref="a" maxOccurs="unbounded"/>
</xs:choice>
</xs:restriction>
</xs:complexContent>
</xs:complexType>
</xs:schema>
For the complex type groupRestrictedType I receive these two error messages in Oxygen 7:
E rcase-RecurseLax.1: Group's occurrence range, (1,unbounded), is not a valid restriction of base group's occurrence range, (1,1).
E derivation-ok-restriction.5.4.2: Error for type 'groupRestrictedType'. The particle of the type is not a valid restriction of the particle of the base.
Compare the "invalid" type with the valid restrictedType!
What am I missing here?
Thanks,
Richard
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://www.ubs.com/namespace/wbml-render" xmlns="http://www.ubs.com/namespace/wbml-render" xmlns:wbr="http://www.ubs.com/namespace/wbml-render">
<xs:element name="a" type="xs:string"/>
<xs:element name="a1" type="xs:string"/>
<xs:element name="a2" type="xs:string"/>
<xs:element name="a3" type="xs:string"/>
<xs:element name="b" type="xs:integer"/>
<xs:group name="a-Group">
<xs:choice>
<xs:element ref="a1"/>
<xs:element ref="a2"/>
<xs:element ref="a3"/>
</xs:choice>
</xs:group>
<xs:complexType name="groupBaseType">
<xs:choice>
<xs:group ref="a-Group" maxOccurs="unbounded"/>
<xs:element ref="b"/>
</xs:choice>
</xs:complexType>
<xs:complexType name="groupRestrictedType">
<xs:complexContent>
<xs:restriction base="groupBaseType">
<xs:choice>
<xs:group ref="a-Group" maxOccurs="unbounded"/>
</xs:choice>
</xs:restriction>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="baseType">
<xs:choice>
<xs:element ref="a" maxOccurs="unbounded"/>
<xs:element ref="b"/>
</xs:choice>
</xs:complexType>
<xs:complexType name="restrictedType">
<xs:complexContent>
<xs:restriction base="baseType">
<xs:choice>
<xs:element ref="a" maxOccurs="unbounded"/>
</xs:choice>
</xs:restriction>
</xs:complexContent>
</xs:complexType>
</xs:schema>
For the complex type groupRestrictedType I receive these two error messages in Oxygen 7:
E rcase-RecurseLax.1: Group's occurrence range, (1,unbounded), is not a valid restriction of base group's occurrence range, (1,1).
E derivation-ok-restriction.5.4.2: Error for type 'groupRestrictedType'. The particle of the type is not a valid restriction of the particle of the base.
Compare the "invalid" type with the valid restrictedType!
What am I missing here?
Thanks,
Richard