W3C home > Mailing lists > Public > xmlschema-dev@w3.org > February 2005

SV: empty elements and xsd:string

From: Bryan Rasmussen <brs@itst.dk>
Date: Mon, 21 Feb 2005 15:11:30 +0100
Message-ID: <D45A5694803BE943BA46F9A7262BF83D123653@its42.itst.local>
To: 'George Cristian Bina' <george@oxygenxml.com>
Cc: xmlschema-dev@w3.org

Okay thanks George,

But I'm wondering now, does this mean that there are also empty
nonNegativeIntegers and the like?

Best Regards,
Bryan Rasmussen

-----Oprindelig meddelelse-----
Fra: George Cristian Bina [mailto:george@oxygenxml.com]
Sendt: 21. februar 2005 13:07
Til: Bryan Rasmussen
Cc: xmlschema-dev@w3.org
Emne: Re: empty elements and xsd:string

Hi Bryan,

That is an empty string. For instance the XML Schema specification part 
2 contains an example that defines a non empty string so it is clear 
that the empty string is accepted by xs:string.

4 Datatype components
4.3 Constraining Facets
4.3.2 minLength

The following is the definition of a ˇuser-derivedˇ datatype which 
requires strings to have at least one character (i.e., the empty string 
is not in the ˇvalue spaceˇ of this datatype).

<simpleType name='non-empty-string'>
   <restriction base='string'>
     <minLength value='1'/>

Best Regards,
George Cristian Bina
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger

Bryan Rasmussen wrote:
> I've encountered validators which accept an empty element the content of
> which is specified as being of type xsd:string. This strikes me as being
> wrong, and references to why it would be okay?
Received on Monday, 21 February 2005 14:18:03 UTC

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