W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > April to June 2008

[Bug 5675] Allowing inheritance of anyAttribute when restricting

From: <bugzilla@farnsworth.w3.org>
Date: Fri, 02 May 2008 17:36:51 +0000
CC:
To: www-xml-schema-comments@w3.org
Message-Id: <E1JrzBj-0003OJ-Qq@farnsworth.w3.org>

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

           Summary: Allowing inheritance of anyAttribute when restricting
           Product: XML Schema
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Structures: XSD Part 1
        AssignedTo: cmsmcq@w3.org
        ReportedBy: fabio@cs.unibo.it
         QAContact: www-xml-schema-comments@w3.org
                CC: pmarinel@cs.unibo.it


Hello. 

I do not know if in XSD 1.1 the WG is examining the problem of restrictions for
attribute wildcards.

Although when deriving a complex type by restriction the base type definition's
attribute uses is automatically inherited by the restricted type, in section
3.4.2 of http://www.w3.org/TR/2007/WD-xmlschema11-1-20070830/ it is stated that
the base type definition's attribute wildcard is *not* inherited. 

Therefore we end up with two different rules for attribute uses and attribute
wildcard which are in our mind not only difficult to understand, but also
making noteworthy use cases difficult (or even impossible) to deal with. 

For example, as it often the case, we could decide to provide a ur-type (from
which all other types are derived) to define a number of features (among which,
for instance, core attributes such as class, title and id in XHTML) that are
shared among all subsequent derived types. A very important schema-wide
decision could be allowing any attribute using the anyAttribute wildcard. But
unfortunately we cannot just place the anyAttribute element in the ur-type, as
any subsequent restriction, while maintaining the core attribute set, would
remove it. Having or not having an attribute wildcard, therefore, cannot be a
schema-wide decision. This is very unfortunate. 

I can provide a simplified version of the CEN Metalex schema that examines the
problem. We would like to allow attributes from external namespaces, such as
RDFA. Currently the two examples are not valid, and would become so only by
adding the anyAttribute element in all derived types. 

We strongly suggest allowing element wildcards to be inherited by restriction,
if possible directly in version 1.1.

Ciao

Fabio and Paolo
Received on Friday, 2 May 2008 17:37:23 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 6 December 2009 18:13:15 GMT