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

Can I define a default value for a QName attribute?

From: Michael Kay <mhk@mhk.me.uk>
Date: Mon, 26 Apr 2004 21:51:53 +0100
To: <xmlschema-dev@w3.org>
Message-Id: <20040426205327.30A08A1EE5@frink.w3.org>

Schema Part 1, if I understand it correctly, says that the specifying a
default value for an attribute causes the  canonical lexical representation
of that default value to be used as the value of a missing attribute.

So what happens if the type of the attribute is one for which no canonical
lexical value is defined? This appears to apply to:

gYearMonth, gYear, gMonthDay, gMonth, gDay

For most of these one can dream up a lexical representation that will serve
the purpose (or more simply, one can use the lexical value as it was written
in the schema document). But what about attributes of type QName and
NOTATION? What prefix is used in forming the canonical lexical
representation? What happens if the namespace URI of the QName is not
declared in the instance document?

Michael Kay
Received on Monday, 26 April 2004 16:53:27 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:05 UTC