W3C home > Mailing lists > Public > xmlschema-dev@w3.org > November 2000

Empty elements?

From: Hollom, Rupert (ITD) <Rupert.Hollom@maff.gsi.gov.uk>
Date: Thu, 9 Nov 2000 15:51:57 -0000
Message-ID: <6EA1753FFBA0D411B92C0008C75B936A09A162@gb013dx.maff.gov.uk>
To: "Xmlschema-Dev (E-mail)" <xmlschema-dev@w3.org>
Sorry if this is a dumb question...

I have written an XML Schema that on the whole is OK, however I have got one
problem with it - there are two elements that are required but could
potentially be empty.  

Here is an extract from my schema for one of the elements:
<xsd:element name="otherholdings" type="eforms:OtherHoldingsStructure"/>
	<!-- Start of OtherHoldingsStructure type definition -->
	<xsd:complexType name="OtherHoldingsStructure">
		<xsd:element name="holding" minOccurs="0"
					<xsd:element name="cph"
					<xsd:element name="area"
	<!-- End of OtherHoldingsStructure type definition -->

and from an example document:

When I attempt to validate the document using the Oracle schema parser it
gives the following error:
<Line 27, Column 18>: XSD-2021: (Error) Element not completed:
<Line 109, Column 13>: XSD-2021: (Error) Element not completed: 'hillfarm'
Parser Exception: Element not completed: 'otherholdings'

'hillfarm' is the other similar element, so my question is how do I do this
with the schema?

Thanks in adavance,
Rupert Hollom
E-Forms Technical Specialist
EMail: rupert.hollom@maff.gsi.gov.uk
Received on Thursday, 9 November 2000 10:53:42 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:49 UTC