Fixing element/attribute plus 'ref'

Henry S. Thompson
19 September 2000

1.   Report from the front

I've made an attempt at implementing the WG's decision wrt <element ref=...

I have found a number of things:

  1. Simply 'raising' the offending properties from copies of element declarations to the particle above is extremely messy, with ramifications through a range of Validation Role constraints;
  2. Using an new Element Use component improves the situation some, but still adds considerable complexity;
  3. In none of the schemas I can quickly look at (about 20, including the SforS) are there any examples of any other attributes on <element ref='...' besides minOccurs and maxOccurs;
  4. Similarly for <attribute ref='...', including the fact that in one of the schemas I looked at principled use was made of global attribute declarations which were sometimes refed simply, resulting in an optional declaration, and sometimes refed with a use='required' attribute;
  5. The change required to support use on <attribute ref='...' is very modest, without significant ramifications.

Accordingly, I request the WG to reconsider its decision on this issue, and instruct me to proceed as follows:

  1. Simplify the content model of element declarations with ref attributes so they must not specify any of the problematic properties (nullable, value constraint, identity-constraint definitions, disallowed substitutions;
  2. Simplify the content model of attribute declarations with ref attributes so they must not specify value constraint;
  3. Change the {attribute declarations} property of the complex type definition component to be a set of triples of min, max and attribute declaration, with the obvious interpretation.

(1) above eliminates the need to have modified element declarations;

(2) and (3) eliminate the need to have modified attribute declarations while retaining the parallel between elements and attributes.

This option not only is easy to implement, it leaves no barrier to subsequent improvements. I don't believe there is any other solution with either of these properties.