- From: Xan Gregg <xan@tibco.com>
- Date: Thu, 1 Aug 2002 14:22:58 -0400
- 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 from: (name, age, #other*) -> (name, age, ssn, #other*) to: (name, age, #other*, #other*) -> (name, age, ssn, #other*) However, I'd wouldn't be surprised if even that rule becomes a mess to implement. 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. xan -----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:sequence> <xs:element name="name" type="xs:string" /> <xs:element name="age" type="xs:double" /> <xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded" /> </xs:sequence> </xs:complexType> to: <xs:complexType name="WageSlave" > <xs:complexContent> <xs:restriction base="Person" > <xs:sequence> <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" /> </xs:sequence> </xs:restriction> </xs:complexContent> </xs:complexType> 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. Cheers, Jeni --- Jeni Tennison http://www.jenitennison.com/
Received on Thursday, 1 August 2002 14:28:57 UTC