W3C home > Mailing lists > Public > xmlschema-dev@w3.org > September 2004

RE: canonical lexical rep

From: Michael Kay <mike@saxonica.com>
Date: Tue, 28 Sep 2004 09:12:07 +0100
To: "'Xan Gregg'" <xan.gregg@jmp.com>, <xmlschema-dev@w3.org>
Message-Id: <E1CCD5m-0007fu-00@ukmail1.eechost.net>

> The dependency relates to default values, which are stored in the 
> component property as values (not lexical representations).  When a 
> schema inserts the value into an instance document, it used the 
> canonical representation of the value.
> Not all datatypes have canonical representations.  xs:QName, 
> at least, doesn't.

Does this imply that elements/attributes whose data type has no canonical
representation cannot have a default value?

This would make life easier! If the schema specifies

<xs:attribute name="q" type="xs:QName" default="my:value"

and the instance document includes neither this attribute nor any namespace
declaration for "some.uri", is the instance valid? I can't see any rule
saying it isn't; but it surely can't be valid, because the expanded document
can't be serialized as well-formed XML - except by adding namespaces to the
document, which section 3.2.5 doesn't mention as a possibility.

Michael Kay
Received on Tuesday, 28 September 2004 08:12:13 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:24 UTC