W3C home > Mailing lists > Public > xmlschema-dev@w3.org > August 2012

Re: XML Schema quiz on default values

From: Michael Kay <mike@saxonica.com>
Date: Fri, 24 Aug 2012 00:02:04 +0100
Message-ID: <5036B66C.8050306@saxonica.com>
To: xmlschema-dev@w3.org
Answer: the value of Title is the empty string, not the default value. 
The reason is that the empty string is a valid value of the string data 
type. If you want Title to have the default value then you must 
explicitly enter the default value: <Title>Hello World</Title>

WRONG. The default applies when the element is empty, not when it is 

Michael Kay
Received on Thursday, 23 August 2012 23:02:17 UTC

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