[Bug 8119] defaultAttributes and complexType extension/restriction don't play nice

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





--- Comment #3 from Kevin Braun <kbraun@obj-sys.com>  2009-11-02 15:10:16 ---
Yes, it really is a usability issue and not a logical inconsistency.  I
understand the point about its relative impact versus getting 1.1 out.

However, it does seem to me rather unfortunate if this feature goes out as-is. 
Assume that I want every complex type to have the default attributes.  The
intent seems to be that I would then just specify defaultAttributes="XYZ" on
the schema.  However, in reality, since defaultAttributesApply="true" is the
default for all complex types, I must additionally specify
defaultAttributesApply="false" for all types that extend a complex type. 
Otherwise, I'll get errors for duplicate attributes.  So, the feature doesn't
seem to quite work the intended magic, which I think is unfortunate.

I think something along the following lines would be closer to having the
intended effect.  Let defaultAttributesApply be a property of the ComplexType
component, set in the following way:
   if the "defaultAttributesApply" attribute is present: the specified value
   else if complex type with implicit content: true
   else if derivation method = restriction:  false
   else if derivation method = extension
      if the base type is a simple type : true
      else if the base type is a complex type: false

There might still be some oddball cases, but I think this would let a user
specify "defaultAttributes" on the schema and get every complex type having the
default attributes without having to do anything extra.

I would think if you include this feature in 1.1, you want it to work as
intended and that if it doesn't work as intended now, it won't be easy to
change later.  If you agree that it doesn't quite achieve what you wanted, you
might not want to put it in at all, or else fix it?


-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Monday, 2 November 2009 15:10:18 UTC