- From: Anli Shundi <ashundi@tibco.com>
- Date: Thu, 15 May 2003 13:28:53 -0400
- To: "'hans meier'" <hansmeier000@yahoo.de>, xmlschema-dev@w3.org
- Message-ID: <339902DC0E58D411986A00B0D03D843201C17E84@extmail.rtp.tibco.com>
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 <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. www.tibco.com -----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 Hello, I came across the following thread on the derivation of mixed content models. http://lists.w3.org/Archives/Public/xmlschema-dev/2001Oct/0113.html <http://lists.w3.org/Archives/Public/xmlschema-dev/2001Oct/0113.html> 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:sequence> <xs:element name="bar" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> <xs:element name="foo"> <xs:complexType mixed="true"> <xs:complexContent> <xs:restriction base="base"> <xs:sequence> <xs:element name="bar" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> </xs:restriction> </xs:complexContent> </xs:complexType> </xs:element> </xs:schema> ---- <foo xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance <http://www.w3.org/2001/XMLSchema-instance> " xsi:noNamespaceSchemaLocation="05_mixedDeriv_nm_m_r.xsd"> text <bar/> </foo> ---------------------------------------------------------------------------- --------- Error or misunderstanding on my side?? Please bring some light in the dark. Thank you Hans _____ 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 <http://de.yahoo.com/mail_de/tagline/?http://www.shortwin.de/index.cfm?pp_id =321231> .
Received on Thursday, 15 May 2003 13:37:02 UTC