- 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>
> > 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" xmlns:my="some.uri"/> 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 http://www.saxonica.com/
Received on Tuesday, 28 September 2004 08:12:13 UTC