- From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
- Date: Tue, 02 Sep 2003 09:28:07 +0100
- To: Cams Ismael <Ismael.Cams@siemens.com>
- Cc: "'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org>
Cams Ismael <Ismael.Cams@siemens.com> writes: > Hello all, > > how can i define that an element may not be empty. > Now I use: > > <xsd:simpleType name="nonEmptyString"> > <xsd:restriction base="xsd:string"> > <xsd:minLength value="1"/> > </xsd:restriction> > </xsd:simpleType> That may not have the effect you expect -- it would allow <a> </a> for instance. But it's a reasonable approach. The other possible route is to use a 'pattern' facet. > Is there an attribute or a general rule to indicate the content of an > element may not be empty ? No. ht -- Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh Half-time member of W3C Team 2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440 Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk URL: http://www.ltg.ed.ac.uk/~ht/ [mail really from me _always_ has this .sig -- mail without it is forged spam]
Received on Tuesday, 2 September 2003 04:29:53 UTC