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

RE: Should this schema be invalid?

From: Xan Gregg <xan@tibco.com>
Date: Thu, 1 Aug 2002 14:22:58 -0400
Message-ID: <339902DC0E58D411986A00B0D03D84320186A3E4@extmail.extensibility.com>
To: "'Jeni Tennison'" <jeni@jenitennison.com>, Dare Obasanjo <dareo@microsoft.com>
Cc: xmlschema-dev@w3.org, Cliff Schmidt <cschmidt@microsoft.com>

Anyone got any suggestions for improving the restriction rules?  Seems like
a hard problem to capture the desired sematics "R is a valid restriction of
B if every valid instance of R is also a valid instance of B" in a set of
rules that are straightforward to implement.

I'll make a suggestion that covers the case Dare raises:  For purposes of
establishing the mapping, base particles may be split into equivalent pairs
of particles (recursively).

So, since (A*) is "equivalent" to (A*, A*) the mapping in question can go
   (name, age, #other*) -> (name, age, ssn, #other*)
   (name, age, #other*, #other*) -> (name, age, ssn, #other*)

However, I'd wouldn't be surprised if even that rule becomes a mess to

Rules for anything tricky like (A,B)* restricting (A|B)* would probably have
to drop down to the state machine level like the alternative wording of the
UPA in appendix H. 


-----Original Message-----
From: Jeni Tennison [mailto:jeni@jenitennison.com]
Sent: Thursday, August 01, 2002 12:41 PM
To: Dare Obasanjo
Cc: xmlschema-dev@w3.org; Cliff Schmidt; www-xml-schema-comments@w3.org
Subject: Re: Should this schema be invalid?

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 14:28:57 UTC

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