[XMLSCHEMA-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Default value of an element with mixed content

From: Michael Kay <mike@saxonica.com>
Date: Mon, 2 Jan 2006 11:18:47 -0000
To: <xmlschema-dev@w3.org>
Message-ID: <E1EtNiS-00010O-Ob@lisa.w3.org>
value of mixed content


It's apparently permissible for an element with mixed content to have a
default (or fixed) value.

Section 3.3.1 of Part 1 says:

If default is specified, and if the element being ·validated· is empty, then
the canonical form of the supplied constraint value becomes the [schema
normalized value] of the ·validated· element in the ·post-schema-validation
infoset·.

But the definition of [schema normalized value] says:

1 If clause 3.2 of Element Locally Valid (Element) (§3.3.4) and Element
Default Value (§3.3.5) above have not applied and either the ·type
definition· is a simple type definition or its {content type} is a simple
type definition, then the ·normalized value· of the item as ·validated·.
2 otherwise ·absent·.

which implies that if the type definition is a complex type with complex
content, then the schema normalized value is always absent.

There seems to be a contradiction here: can an element with mixed content
have a [schema normalized value], or not?

Furthermore, the definition of [schema normalized value] appears to say that
the [schema normalized value] will always be ·absent· if Element Default
Value (§3.3.5) applies, whereas Element Default Value (§3.3.5) says that in
this situation the [schema normalized value] will be the canonical lexical
representation of the {value constraint} value. They can't both be right...



Michael Kay
http://www.saxonica.com/ 
Received on Monday, 2 January 2006 11:19:08 GMT

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.