[Bug 6163] 3.10.6.3 Attribute Wildcard Union

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





--- Comment #2 from Michael Kay <mike@saxonica.com>  2008-10-22 14:28:18 ---
More thoughts on (4). I see now why (for example) the union of

<xs:anyAttribute notQName="##defined" id="P"/>

and

<xs:anyAttribute namespace="##local" id="Q"/>

is inexpressible: there is no way to express a wildcard that allows all
attributes in the *absent* namespace plus all attributes other than globally
declared attributes in other namespaces.

But consider the consequences. Wildcard union is used in only one place: where
types are derived by extension. In this situation, if the base type is defined
with wildcard P, and the extension type is defined with wildcard Q, then the
actual complex type component will have wildcard Q. This hardly reflects the
intent of type extension, whereby the extended type should allow everything the
base type allows and more. From this perspective it would be better to combine
the wildcards as:

<xs:anyAttribute/>

That is, the result of the union should be the "smallest expressible wildcard
that has the true union as a subset", which can be constructed simply by
dropping the notQName="##defined" constraint unless it is present on both
wildcards.

Note that there is no compatibility issue with 1.0 in making this change.
Although 1.0 had the same rule about how inexpressible wildcards were handled
during type extension, all unions of 1.0 wildcards are expressible in 1.1; the
only inexpressible wildcards in 1.1 arise when ##defined is used (which is a
symptom of the lack of orthogonality in the design of this feature, but let
that pass).


-- 
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 Wednesday, 22 October 2008 14:28:33 UTC