Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: empty elements and xsd:string

From: George Cristian Bina <george@---------.--->
To: Bryan Rasmussen <brs@----.-->
Date: 2/21/2005 4:14:00 PM
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 =B7user-derived=B7 datatype which 
requires strings to have at least one character (i.e., the empty string 
is not in the =B7value space=B7 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
www.---.com


Bryan Rasmussen wrote:
> 
> I've encountered validators which accept an empty element the content o=
f
> which is specified as being of type xsd:string. This strikes me as bein=
g
> wrong, and references to why it would be okay?
> 
> 
> 

From prze_moc@p... Mon Feb 21 12:19:16 2005
Received: from wi


transparent
Print
Mail
Like It
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