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

recursive definition in XML schema

From: Herve Verjus <herve.verjus@esia.univ-savoie.fr>
Date: Sat, 21 Dec 2002 16:57:27 +0100 (Romance Standard Time)
To: xmlschema-dev@w3.org
Message-ID: <Pine.WNT.4.51.0212211657060.2704@verjus>


Hello,

i would like to use recursive definition in my XML schema. It seems (for
me) that it is not possible but i looked opposite answers that give no
clear response.

I just made a simple test that does not work (this test involves circular
definition):

<?xml version="1.0" encoding="UTF-8"?>
<!--
highlight of this test:
	- recursive simple type definition
-->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
		targetNamespace="http://foo.com"
		xmlns="http://foo.com"
		elementFormDefault="qualified">

	<xsd:simpleType name="abcOrBoolean">
		<xsd:union memberTypes="xsd:boolean abc"/>
	</xsd:simpleType>

	<xsd:simpleType name="abc">
		<xsd:restriction base="abcOrBoolean">
			<xsd:minLength value="5"/>
		</xsd:restriction>
	</xsd:simpleType>
</xsd:schema>


What is exactly the rule about recursive definition as well as circular
definition ?

Thanks for your answers. Regards,

Herve

-- Herve VERJUS -------ooOoo------- herve.verjus@esia.univ-savoie.fr --
-- LISTIC-ESIA (Lab.)               Universite de Savoie
-- B.P. 806                         Tel : +33 (0) 450 096 594
-- F - 74016 ANNECY Cedex           Fax : +33 (0) 450 096 590
Received on Saturday, 21 December 2002 11:01:22 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:35 GMT