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

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





--- Comment #4 from Sandy Gao <sandygao@ca.ibm.com>  2009-11-09 16:30:51 ---
This, to me, looks more like a question about component identity.

In the example in comment #0, there is a single attribute group definition
component, with a single attribute use component in its {attribute uses}
property.

When the {attribute uses} of "TypeB" is calculated, we say it's "a union of
sets of attribute uses as follows". The 2 sets here are {attribute uses} from
the global attribute group definition (defaulted) and {attribute uses} from
"TypeA" (inherited). Given that there is a *single* attribute use component,
the union should *not* result in 2 entries in "TypeB"'s {attribute uses}, and
the relevant constraint (clause 4 of section 3.4.6.1) is *not* violated.

I do agree that component identity is not as clearly specified as one would
like in the spec, but this case is no worse than other cases where we depend on
identity, for example, clause 2.1 of section 3.4.6.5.

> I believe this is not valid, because TypeB's {attribute uses} will have two
> "a_default" attributes.  At least, this would be true if I had explicitly
> defined the same attribute in TypeA and TypeB

These 2 cases are different. 2 references to the same attribute group component
result in a single attribute use; 2 locally declared attributes result in 2
distinct attribute use components.

Now back to clause 4 of section 3.4.6.1:

"4 No two distinct attribute declarations in the {attribute uses} have
identical expanded names."

Trying to understand what it means. Would 2 attribute uses with the *same*
attribute declaration but different, say, fixed value be allowed? (This can
happen when there are 2 references to the same global attribute declaration.) I
would think no. Maybe it meant to say the following instead?

"4 No attribute declarations of two distinct attribute uses in the {attribute
uses} have identical expanded names."

(1.0 uses different words for this rule, but seems to have the same issue.)


-- 
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, 9 November 2009 16:31:01 UTC