Inconsistent Validation - mixed content and group

I have attempted to validate the xml instance with the following schema
(below) in:

MSXML 4.0 (successfully)
MSXML 4.0 SP1 (successfully)
XML Spy 4.2 (successfully)
XML Spy 4.3 (*un*successfully)
XML Spy 4.4 (*un*successfully)

I think the problem is with the combination of using mixed="true" and one or
two layers of groups.  Either I have not found, or do not understand the
specification on what is correct or not.  I would like for the instance
document below to be valid against this schema, as I have a number of schema
that use this construct.

In any case, validation in the products above are inconsistent.  I have not
tried anything else.  I hope that XML Spy 4.3 and 4.4 simply have a bug, in
which case, I also hope the bug will be fixed in a future version.

Any help or advice would be appreciated.

Thanks,

Todd

======================

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="urn:a"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:a"
elementFormDefault="qualified">
 <xsd:complexType name="a" mixed="true">
  <xsd:choice>
   <xsd:group ref="g1" minOccurs="0" maxOccurs="unbounded"/>
  </xsd:choice>
 </xsd:complexType>
 <xsd:group name="g1">
  <xsd:choice>
   <xsd:group ref="g2"/>
  </xsd:choice>
 </xsd:group>
 <xsd:group name="g2">
  <xsd:choice>
   <xsd:element ref="x" maxOccurs="unbounded"/>
   <xsd:element ref="y" maxOccurs="unbounded"/>
  </xsd:choice>
 </xsd:group>
 <xsd:element name="a" type="a"/>
 <xsd:element name="y" type="xsd:string"/>
 <xsd:element name="x" type="xsd:string"/>
</xsd:schema>

=======================================

<?xml version="1.0" encoding="UTF-8"?>
<a xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:a"
xsi:schemaLocation="urn:a a2.xsd">
 <x>content</x>
 <y>content</y>
 content <y/>
 <y>content</y>content <y/>
 <y>content</y>content<y/>
 <y>content</y>
 <y/>
</a>

Received on Tuesday, 28 May 2002 05:40:02 UTC