Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Default value of an element with mixed content

From: Sandy Gao <sandygao@--.---.--->
To: "Michael Kay" <mike@--------.--->
Date: 1/3/2006 5:27:00 AM
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=5Fbug.cgi?id=2632

Thanks,
Sandy Gao
XML Parser Development, IBM Canada
(1-905) 413-3255
sandygao@c...




"Michael Kay" <mike@s...> 
Sent by: xmlschema-dev-request@w...
01/02/2006 06:18 AM

To
<xmlschema-dev@w...>
cc

Subject
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 =B7validated=B7 is empty,=
 
then
the canonical form of the supplied constraint value becomes the [schema
normalized value] of the =B7validated=B7 element in the 
=B7post-schema-validation
infoset=B7.

But the definition of [schema normalized value] says:

1 If clause 3.2 of Element Locally Valid (Element) (=A73.3.4) and Element
Default Value (=A73.3.5) above have not applied and either the =B7type
definition=B7 is a simple type definition or its {content type} is a simple
type definition, then the =B7normalized value=B7 of the item as =B7validate=
d=B7.
2 otherwise =B7absent=B7.

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 =B7absent=B7 if Element Default
Value (=A73.3.5) applies, whereas Element Default Value (=A73.3.5) says tha=
t 
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/ 






transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent