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

RE: canonical lexical rep

From: Xan Gregg <Xan.Gregg@jmp.com>
Date: Tue, 28 Sep 2004 12:31:06 -0400
Message-ID: <1F145982392D6143BCF3CC670E4C7FA08284B8@MERC27.na.sas.com>
To: "Michael Kay" <mike@saxonica.com>, <xmlschema-dev@w3.org>

This is issue R-98 against XML Schema.  It has been
classified as an error, but no fix has been produced.



-----Original Message-----
From: Michael Kay [mailto:mike@saxonica.com] 
Sent: Tuesday, September 28, 2004 4:12 AM
To: Xan Gregg; xmlschema-dev@w3.org
Subject: RE: canonical lexical rep

> 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.
Received on Tuesday, 28 September 2004 16:41:43 UTC

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