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

Re: empty elements and xsd:string

From: George Cristian Bina <george@oxygenxml.com>
Date: Mon, 21 Feb 2005 14:13:47 +0200
Message-ID: <4219D07B.3010704@oxygenxml.com>
To: Bryan Rasmussen <brs@itst.dk>
Cc: xmlschema-dev@w3.org
empty string and xsd

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.

http://www.w3.org/TR/xmlschema-2/
4 Datatype components
4.3 Constraining Facets
4.3.2 minLength
http://www.w3.org/TR/xmlschema-2/#rf-minLength

Example
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'/>
   </restriction>
</simpleType>

Best Regards,
George
---------------------------------------------------------------------
George Cristian Bina
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com


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 12:06:39 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.