RE: E rcase-RecurseLax.1: Group's occurrence range, (1,unbounded), is not a valid restriction of base group's occurrence range, (1,1).

Xerces reports this invalid, but Saxon, XSV, MSXML, and the .NET parser all
report it valid.

So it may be a Xerces problem.

(Saxon's evidence in this case isn't particularly reliable, because it uses
a different algorithm for determining whether one type is a valid
restriction of another, an algorithm which is closer to the intent of the
spec than the published rules. This might also apply to XSV, I'm not sure.)

Michael Kay
http://www.saxonica.com/

 

> -----Original Message-----
> From: xmlschema-dev-request@w3.org 
> [mailto:xmlschema-dev-request@w3.org] On Behalf Of richard.liu@ubs.com
> Sent: 13 February 2006 07:10
> To: xmlschema-dev@w3.org
> Subject: E rcase-RecurseLax.1: Group's occurrence range, 
> (1,unbounded), is not a valid restriction of base group's 
> occurrence range, (1,1).
> 
> 
> I have the following W3C XML 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>
> 
> The a-Group is a choice of three elements.  The groupBaseType 
> is a choice of either one to unbounded many instances of 
> a-Group, or of the element b.  I want to define another 
> complex type as a restriction of the groupBaseType.  It 
> should not allow b.
> 
> In Oxygen 7 I receive the following two error messages.
> 
> SystemID: /Applications/oxygen/Untitled1.xsd
> Location: 21:48
> Description: E rcase-RecurseLax.1: Group's occurrence range, 
> (1,unbounded), is not a valid restriction of base group's 
> occurrence range, (1,1).
> URL: http://www.w3.org/TR/xmlschema-1/#rcase-RecurseLax
> 
> SystemID: /Applications/oxygen/Untitled1.xsd
> Location: 21:48
> Description: 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.
> URL: http://www.w3.org/TR/xmlschema-1/#derivation-ok-restriction
> 
> Evidently, based on the second example using baseType and 
> restrictedType, the error messages pertain to the fact that I 
> am using a group, but I don't understand what is wrong.  Can 
> anybody shed light on the error?
> 
> Regards,
> Richard
> 
> Richard R. Liu
> Gundeldingerstr. 171
> CH-4053 Basel
> Switzerland
> 
> Tel. +41 (61) 361 3275
> Email richard.liu@mac.com
> 
> 
> 
> Richard R. Liu
> UBS AG
> VZA2 - 4.140 IVHS-L2V
> Postfach
> CH-8098 Zürich
> Switzerland
> 
> Tel.  +41-44-238 48 82
> Email richard.liu@ubs.com
> 
> 

Received on Monday, 13 February 2006 08:58:34 UTC