OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   How to avoid empty elements

[ Lists Home | Date Index | Thread Index ]
  • From: David Valera <dvalera@pcl-hage.nl>
  • To: xml-dev@lists.xml.org
  • Date: Fri, 11 Aug 2000 10:05:49 +0200


I have defined a simple type like this:

<xsd:element name="Header">
	<xsd:simpleType base="xsd:string">
		<xsd:pattern value="[a-z]{15, 25}"/>

My understanding was that this pattern would only allow strings that match
the value. But if I try to validate this:


then it validates ok.

Is the empty string always allowed, no matter wich pattern value you have?
Is this a bug in my validator software or am I missing something? according
to the XML schema part 2:

S{n,m} = All strings st with s in L(S) and t in L(S{n-1,m-1}). ( All
sequences of at least n, and at most m, strings from L(S) )

and S? = the empty string, and all strings in L(S).

David Valera


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS