Problem with pattern and empty element

Hello,

I have this element in my XML SCHEMA:

<xsd:element name="XXX">
	<xsd:simpleType>
		<xsd:restriction base="xsd:string">
			<xsd:pattern value="([0-9]+|[A-Z]+)+" />
		</xsd:restriction>
	</xsd:simpleType>
</xsd:element>

I am using XML SPY to validate my XML using the SCHEMA I created. The
problem I am having is leaving this element as an empty element,  like
<XXX/>. XML SPY says that the XML doc isn't well formed unless I insert
a value conforming to my pattern.

Is there a way to define a NULL value or some kind of default value that
will allow this element to be left empty?

Thanks,

Kevin

Received on Thursday, 15 November 2001 12:29:46 UTC