W3C home > Mailing lists > Public > xmlschema-dev@w3.org > January 2006

Re: Default value of an element with mixed content

From: Sandy Gao <sandygao@ca.ibm.com>
Date: Tue, 3 Jan 2006 10:26:52 -0500
To: "Michael Kay" <mike@saxonica.com>
Cc: xmlschema-dev@w3.org
Message-ID: <OFE09084FF.D766FC93-ON852570EB.0054A347-852570EB.0054E303@ca.ibm.com>
You are quite right...

I just opened a bug [1] against Schema part I and proposed fixes.

[1] http://www.w3.org/Bugs/Public/show_bug.cgi?id=2632

Sandy Gao
XML Parser Development, IBM Canada
(1-905) 413-3255

"Michael Kay" <mike@saxonica.com> 
Sent by: xmlschema-dev-request@w3.org
01/02/2006 06:18 AM


Default value of an element with 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, 
the canonical form of the supplied constraint value becomes the [schema
normalized value] of the ·validated· element in the 

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 
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 
this situation the [schema normalized value] will be the canonical lexical
representation of the {value constraint} value. They can't both be 

Michael Kay
Received on Tuesday, 3 January 2006 15:27:01 UTC

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