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

RE: Derivation of mixed content models 2nd

From: Anli Shundi <ashundi@tibco.com>
Date: Thu, 15 May 2003 13:28:53 -0400
Message-ID: <339902DC0E58D411986A00B0D03D843201C17E84@extmail.rtp.tibco.com>
To: "'hans meier'" <hansmeier000@yahoo.de>, xmlschema-dev@w3.org
it's an error of the validator since a value valid for the restriction
should be valid
for the base as well.  See [1]
[1] http://www.w3.org/TR/xmlschema-1/#key-typeRestriction
key_typeRestriction[Definition:]  A type definition whose declarations or
facets are in a one-to-one relation with those of another specified type
definition, with each in turn restricting the possibilities of the one it
corresponds to, is said to be a restriction. The specific restrictions might
include narrowed ranges or reduced alternatives. Members of a type, A, whose
definition is a  <http://www.w3.org/TR/xmlschema-1/#key-typeRestriction>
·restriction· of the definition of another type, B, are always members of
type B as well.


Anli Shundi
TIBCO Software Inc.

-----Original Message-----
From: hans meier [mailto:hansmeier000@yahoo.de]
Sent: Thursday, May 15, 2003 9:29 AM
To: xmlschema-dev@w3.org
Subject: Derivation of mixed content models 2nd

I came across the following thread on the derivation of mixed
content models.
If I am not misinterpreting Henry´s answer, the follwing combinations
are allowed
Derivation by extension
base type           derived type
mixed="true"       mixed="true"
mixed="false"      mixed="false"

Derivation by restriction
base type           derived type
mixed="true"       mixed="true"
mixed"false"        mixed="false"
mixed="true"       mixed="false"  if all element content is optional
so it should be an error, if there is mixed="false" in
the base type and mixed="true" in the restricted type.
So why do XSV 2.4 and MSXML 4.0 SP2 say, that the following is valid?
<xs:schema xmlns:xs=" http://www.w3.org/2001/XMLSchema
<http://www.w3.org/2001/XMLSchema> ">
<xs:complexType name="base" >
      <xs:element name="bar" type="xs:string" minOccurs="0"
<xs:element name="foo">
   <xs:complexType mixed="true">
         <xs:restriction base="base">
               <xs:element name="bar" type="xs:string" minOccurs="0"
<foo xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance
<http://www.w3.org/2001/XMLSchema-instance> "
Error or misunderstanding on my side??
Please bring some light in the dark.
Thank you


Gesendet von http://mail.yahoo.de
<http://de.yahoo.com/mail_de/tagline/?http://mail.yahoo.de> .
WAHNSINN! Nur 1x anmelden und dann vollautomatisch an bis zu 2400
Gewinnspielen teilnehmen! www.shortwin.de
=321231> .
Received on Thursday, 15 May 2003 13:37:02 UTC

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