Elements in group optional and repeatable

Hello all,

I'd like to set up a an xs:group which permits a set of elements to be
all optional and all repeatable. I've tried the following:

[assuming I have created a named complexType for "elementType"]

  <xs:element name="title" type="elementType"/>
  <xs:element name="creator" type="elementType"/>
  <xs:element name="subject" type="elementType"/>

  <xs:group name="elementsGroup">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
      <xs:element ref="title" minOccurs="0" maxOccurs="unbounded"/>
      <xs:element ref="creator" minOccurs="0" maxOccurs="unbounded"/>
      <xs:element ref="subject" minOccurs="0" maxOccurs="unbounded"/>
    </xs:choice>
  </xs:group>

XML Spy 4.3 seems to accept this (and give the desired behaviour on
validating instances against it), but both XSV (current online service)
and Xerces C++ 1.6.0 object to the use of minOccurs/maxOccurs on the
xs:choice element. 

The error message from XSV refers to "Invalid per cvc-complex-type.1.3"
but I'm struggling to see which rule at

http://www.w3.org/TR/xmlschema-1/#cvc-complex-type

this is breaking. 

Any thoughts appreciated.

Thanks

Pete
-------
Pete Johnston
Interoperability Research Officer
UKOLN, University of Bath, Bath BA2 7AY, UK
tel: +44 (0)1225 383619    fax: +44 (0)1225 386838
mailto:p.johnston@ukoln.ac.uk
http://www.ukoln.ac.uk/ukoln/staff/p.johnston/
  

Received on Monday, 4 March 2002 13:38:34 UTC