W3C home > Mailing lists > Public > xmlschema-dev@w3.org > May 2002

Inconsistent Validation - mixed content and group

From: Winchel 'Todd' Vincent III <winchel@mindspring.com>
Date: Tue, 28 May 2002 05:23:28 -0400
Message-ID: <001f01c20629$599b2200$e2488990@wtviiilt02>
To: <xmlschema-dev@w3.org>
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.




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


<?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">
 content <y/>
 <y>content</y>content <y/>
Received on Tuesday, 28 May 2002 05:40:02 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:02 UTC