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

RE: coerce mixed/element content to simple content via restriction ?

From: Asir S Vedamuthu <asirv@webmethods.com>
Date: Tue, 11 Jun 2002 15:20:07 -0400
To: "Tom Moog" <tmoog@sarvega.com>
Cc: <xmlschema-dev@w3.org>
Message-ID: <OKEBJFDOCNPMPLOONLOIEEONCHAA.asirv@webmethods.com>

Is this valid ?



-----Original Message-----
From: xmlschema-dev-request@w3.org
[mailto:xmlschema-dev-request@w3.org]On Behalf Of Tom Moog
Sent: Tuesday, June 11, 2002 3:09 PM
To: xmlschema-dev@w3.org
Cc: xmlschema-dev@w3.org
Subject: coerce mixed/element content to simple content via restriction

In a recent book on xml schema there is an example that shows a complex
type with complex content being coerced to simple content because of
an empty restriction plus mixed content.  This looks really odd and seems
to violate the idea that simple content and element content can't appear
in the same derivation hierarchy.

Is this valid ?

The author appears to know that this is unusual because she adds, "This is

the only case where a restriction element may have both a base attribute
and a simpleType child".

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" >

<xs:complexType name="BaseType" mixed="true">
   <xs:sequence minOccurs="0">
     <xs:element name="a" type="xs:string" />

<xs:complexType name="DerivedType" mixed="true">
    <xs:restriction base="BaseType">
        <xs:restriction base="xs:string" />

Received on Tuesday, 11 June 2002 15:16:07 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:57 UTC