This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 6170 - Wildcards and defaultAttributes
Summary: Wildcards and defaultAttributes
Status: RESOLVED FIXED
Alias: None
Product: XML Schema
Classification: Unclassified
Component: Structures: XSD Part 1 (show other bugs)
Version: 1.1 only
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: C. M. Sperberg-McQueen
QA Contact: XML Schema comments list
URL:
Whiteboard:
Keywords: resolved
Depends on:
Blocks:
 
Reported: 2008-10-17 09:03 UTC by Michael Kay
Modified: 2008-10-24 17:26 UTC (History)
0 users

See Also:


Attachments

Description Michael Kay 2008-10-17 09:03:22 UTC
In 3.4.2.4, XML Mapping summary, property {attribute uses}, it is stated

<quote>
If the <schema> ancestor has a defaultAttributes attribute, and the <complexType> element does not have defaultAttributesApply = false, then the properties {attribute uses} and {attribute wildcard} are computed as if there were an <attributeGroup> [child] with empty content and a ref [attribute] whose ·actual value· is the same as that of the defaultAttributes  [attribute].
</quote>

For completeness, it needs to say whether this hypothetical <attributeGroup> child is at the start or the end. This is because when multiple attribute groups are combined, and more than one of them has an attribute wildcard, the effective processContents is taken from the first.

(This is a horrible rule, but it's the only one we've got. I've argued in WG email (see http://lists.w3.org/Archives/Member/w3c-xml-schema-ig/2008Oct/0009.html - member-only) that at least for defaultAttributes the result should be the union rather than the intersection, and by analogy with derivation by extension, the processContents would then be that of the extended type rather than the base type.).
Comment 1 Michael Kay 2008-10-17 10:02:01 UTC
Another problem with this text is that it appears in the mapping rule for the {attribute uses} property; it needs to appear again, or be referenced, in the mapping rule for the {attribute wildcard} property.
Comment 2 Sandy Gao 2008-10-17 16:53:45 UTC
My intuition is the "end", to allow local rules to override the default.

The issue raised in [1] probably warrants an entry in Bugzilla so that we don't lose track of it.

[1] http://lists.w3.org/Archives/Member/w3c-xml-schema-ig/2008Oct/0009.html
Comment 3 Sandy Gao 2008-10-24 17:26:29 UTC
On 2008-10-24, the working group adopted a proposal to address this issue by
- Specifying that defaulted attribute group appears after the explicitly referenced attribute groups
- Repeating rules around applying default attributes in "3.4.2.5 Mapping Rule for Attribute Wildcard Property"

The proposal (along with changes for other bugs) can be found at (member-only):
http://www.w3.org/XML/Group/2004/06/xmlschema-1/structures.omni0810.html