RE: CR Feedback and Implementation


the implementation problem (a) is not too much of a concern for me (even
though this is currently a bug in the beta 3.5 version of our XML Spy
software ;)

I'm much more concerned about (b), because in [1] we say "All such members
must have type definitions which are either the same as the head's type
definition or restrictions or extensions of it." and consequently a cyclic
substitution group requires all substitution group members that participate
in forming the cycle to have type definitions that are exactly the same.

As this entirely defies the whole purpose of a substitution group, I believe
that there is not much practical use for circular substitution groups and,
therefore, it would be preferable to explicitly disallow them in the frist
place, which would then allow schema tool vendors the option of alerting a
user to any inadvertedly formed cyclic substitution group and thereby
provide better feedback to schema authors.

This is also based on feedback we received during the beta testing of XML
Spy 3.5, where a couple of people reported enless loops as a result of
accidentially forming a circular substitution group and they have been very
happy, when our support staff pointed out the problem to them, because they
didn't want to build a cyclic group at all.

Anyway, perhaps the best way is to indeed request feedback from everyone on
this list, whether or not they know of any real use for circular
substitution groups.


... Alexander Falk
... President, CEO
... Altova, Inc. - The XML Spy Company

XML Spy 3.0  -  the first true Integrated Development Environment for XML
Visit to download a free 30-day evaluation version


-----Original Message-----
From: C. M. Sperberg-McQueen []
Sent: Tuesday, January 09, 2001 01:27
To: Falk, Alexander
Cc: ''; ''
Subject: Re: CR Feedback and Implementation

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 (<> by 
>Alexander Falk (Altova, Inc.) -->  <xsd:schema 
>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.
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 Tuesday, 9 January 2001 04:39:45 UTC