W3C home > Mailing lists > Public > xmlschema-dev@w3.org > March 2003

{content type} of derived type is mixed (XSV result)

From: Stanley Guan <stanley.guan@oracle.com>
Date: Thu, 13 Mar 2003 19:03:36 -0800
Message-ID: <073a01c2e9d6$4e92c570$c5b42382@us.oracle.com>
To: <xmlschema-dev@w3.org>
Cc: "Henry S. Thompson" <ht@cogsci.ed.ac.uk>

Based on "new versions of XML Schema REC documents with errata folded in",
it seems to me the following schema document should be invalid because the
{content type} of derived type (i.e., base2) is mixed while the {content
of the {base type definition} is not.

However, XSV didn't detect such violation.  Is it because this new
was not implemented yet or my interpretation is wrong?



Schema Component Constraint: Derivation Valid (Restriction, Complex)

5.4 All of the following must be true:
5.4.1 One of the following must be true: The {content type} of the complex type definition itself must be
element-only The {content type} of the complex type definition itself and of the
{base type definition} must be mixed

<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">

 <xsd:element name="root">
    <xsd:element ref="test" minOccurs="0"/>

 <xsd:element name="test" type="base1"/>

 <xsd:complexType name="base1" >
  <xsd:extension base="xsd:integer">
                   <xsd:attribute name="any"/>

 <xsd:complexType name="base2" mixed="true" >
  <xsd:restriction base="base1">
   <xsd:attribute name="any" use="optional" />

Received on Thursday, 13 March 2003 22:05:28 UTC

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