[Bug 13457] Schema has default value for xsi:type

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

Michael Kay <mike@saxonica.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mike@saxonica.com

--- Comment #1 from Michael Kay <mike@saxonica.com> 2011-10-08 15:54:27 UTC ---
I would like further discussion of this.

3.2.6.4 says: Note: It is legal for Attribute Uses that refer to xsi:
attributes to specify default or fixed value constraints (e.g. in a component
corresponding to a schema document construct of the form <xs:attribute
ref="xsi:type" default="xs:integer"/>), but the practice is not recommended;
including such attribute uses will tend to mislead readers of the schema
document, because the attribute uses would have no effect; see Element Locally
Valid (Complex Type) (§3.4.4.2) and Attribute Default Value (§3.4.5.1) for
details.

Unfortunately neither of the linked sections explains why the attribute use has
no effect: would another citation be more useful? 

While the xsi:type may play no role in determining the governing type of the
element, I believe it needs to be a valid QName. The test was attempting to
determine what happens if it isn't.

3.4.5.1 does say: Note: When a default value of type QName or NOTATION is
applied, it is ·implementation-dependent· whether ·namespace fixup· occurs; if
it does not, the prefix used in the lexical representation (in [normalized
value] or [schema normalized value]) will not necessarily map to the namespace
name of the value (in [schema actual value]). To reduce problems and confusion,
users may prefer to ensure that the required namespace information item is
present in the input info set.

which suggests that a processor can either reject this attribute as invalid on
the grounds that the prefix is undeclared, or it can perform mixup to declare
the attribute. I would be grateful to know if the WG agrees with this analysis.

-- 
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 Saturday, 8 October 2011 15:54:31 UTC