W3C home > Mailing lists > Public > xmlschema-dev@w3.org > December 2004

[xmlschema-dev] <none>

From: Chris Drozdowski <c.d@earthlink.net>
Date: Sat, 11 Dec 2004 10:38:44 -0500
Message-Id: <BDB2DB1E-4B8A-11D9-93E8-000A278A9BE2@earthlink.net>
To: xmlschema-dev@w3.org

Can an element in an XML document be empty if it is defined as a token 
type in the schema (see example below)?
My validator will accept empty elements if the type is string but 
chokes on token.

<?xml version="1.0"?>

<?xml version="1.0" encoding="ISO-8859-1"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

<xs:element name="people">
             <xs:element name="person" type="persontype" minOccurs="0" 

<xs:complexType name="persontype">
         <xs:element name="fname" type="xs:token"/>
         <xs:element name="mfname" type="xs:token"/>
         <xs:element name="lfname" type="xs:token"/>



Chris Drozdowski

Received on Saturday, 11 December 2004 17:10:57 UTC

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