W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > January to March 2001

Re: CR Feedback and Implementation

From: C. M. Sperberg-McQueen <cmsmcq@acm.org>
Date: Mon, 08 Jan 2001 17:26:38 -0700
Message-Id: <4.3.2.7.1.20010108172220.027e0b60@espanola.com>
To: "Falk, Alexander" <al@altova.com>
Cc: "'www-xml-schema-comments@w3.org'" <www-xml-schema-comments@w3.org>, "'w3c-xml-schema-ig@w3.org'" <w3c-xml-schema-ig@w3.org>
At 2000-12-14 09:23, Falk, Alexander wrote:
>3) the CR allows the chaining of substitutionGroups, which is illustrated 
>in the following skeleton example (complexTypes and extensions are omitted 
>for clarity):
><?xml version="1.0" encoding="UTF-8"?>  <!-- edited with XML Spy v3.5 NT 
>beta 2 build Dec 11 2000 (<http://www.xmlspy.com>http://www.xmlspy.com) by 
>Alexander Falk (Altova, Inc.) -->  <xsd:schema 
>xmlns:xsd="<http://www.w3.org/2000/10/XMLSchema>http://www.w3.org/2000/10/XMLSchema" 
>elementFormDefault="qualified">         <xsd:element 
>name="a"/>         <xsd:element name="b" 
>substitutionGroup="a"/>         <xsd:element name="c" 
>substitutionGroup="b"/>  </xsd:schema>
>which results in a schema, where a <b> or <c> element can be substituted 
>for any <a> and also a <c> can be substituted for any <b>. If, however, a 
>schema author accidentially modifies the definition of element <a> to read
>         <xsd:element name="a" substitutionGroup="c"/>
>then we have a cyclic link in the substitutionGroup chain, which should 
>perhaps be explicitely forbidden by the schema rec.

Well, I quite agree that careless changes can lead to unfortunate results.  But
I am not quite sure whether you are recommending that cycles be forbidding
(a) because they cause implementation problems, or (b) because in real
life we believe they will almost always be the result of error, and 
forbidding them
will provide better feedback for more schema authors than allowing them.

If (a), could you expand a little on the implementation issues?

If (b), I guess I need to ask the readers of this list whether they can see
any use for circular substitution groups.

-C. M. Sperberg-McQueen
Received on Monday, 8 January 2001 20:12:26 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 6 December 2009 18:12:49 GMT