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

Re: Should this schema be invalid?

From: Jeni Tennison <jeni@jenitennison.com>
Date: Thu, 1 Aug 2002 17:41:09 +0100
Message-ID: <15586669944.20020801174109@jenitennison.com>
To: "Dare Obasanjo" <dareo@microsoft.com>
CC: xmlschema-dev@w3.org, "Cliff Schmidt" <cschmidt@microsoft.com>, www-xml-schema-comments@w3.org

Hi Dare,

> To clarify, I wasn't asking because we plan to start ignoring the
> pointless rules in W3C XML Schema. We are completely committed to
> standards compliance with regards to W3C XML Schema.

Good :)

> I just wanted to highlight why the pointlessness rules are bad and
> should be removed from the REC post haste.

Actually, I don't think that the pointlessness rules are the problem.
I think it's equally unhelpful to say that the derivation from:

<xs:complexType name="Person" >
    <xs:element name="name" type="xs:string" />
    <xs:element name="age" type="xs:double" />
    <xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded"  />


<xs:complexType name="WageSlave" >
    <xs:restriction base="Person" >
        <xs:element name="name" type="xs:string" />
        <xs:element name="age" type="xs:double" />
        <xs:element name="ssn" type="xs:string" />
        <xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded" />

is invalid as it is to say that the derivation to the type with a
pointless sequence wrapper around the ssn and wildcard is invalid.

I think the main problem here is with the "complete order-preserving
functional mapping" required when deriving a sequence from a sequence,
when the derived sequence acts to fix the allowed elements (and order
of elements) from a less specific wildcard or choice.

It's a shame that the errata on the Structures document
(http://www.w3.org/2001/05/xmlschema-errata#Errata1, particularly
erratum E1-7) address the invalidity of the schema for schemas (which
arises due to problems in how the particle derivation constraints
work) by changing the schema for schemas rather than by addressing the
particle derivation rules themselves.



Jeni Tennison
Received on Thursday, 1 August 2002 12:41:11 UTC

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