[Bug 5063] Inheritance of some SML reference constraints

http://www.w3.org/Bugs/Public/show_bug.cgi?id=5063





------- Comment #5 from sandygao@ca.ibm.com  2007-11-08 21:41 -------
Example:
1. complex type B1 has local E with targetType="xs:decimal".
2. complex type B2 has local E with targetType="xs:boolean".
3. global group definition G has local E without targetType.
4. complex type R1 derived by restriction from B1 with a reference to G.
5. complex type R2 derived by restriction from B2 with a reference to G.

Question: what's the value for targetType for E in R1 and R2? It should be
"xs:decimal" if inherited from B1, but "xs:boolean" if inherited from B2.

Possible answer:
1. Invalid, because there are multiple inheritance sources.
2. Valid, and introduce rules (similar to schema 1.1 type table) that make
inheritance happen at complex type level, as opposed to particle/element level.

Neither answer sounds particularly attractive. On the other hand, if we say
constraints are *not* inherited through particle restriction, then:
- No need to handle the above case
- It's aligned with XML Schema
  - Schema authors can expect same behavior for schema and sml constraints

Note that "not inheriting" doesn't cause much trouble for schema authors:
- Not much burden to repeat sml:target* constraints (attributes)
- With the "ref" attribute introduced, sml:key/keyref etc. constraints are also
easy to repeat.

Received on Thursday, 8 November 2007 21:41:16 UTC