W3C home > Mailing lists > Public > xmlschema-dev@w3.org > April 2001

Infinite recursion of complex types

From: Ian Stokes-Rees <ijs@decisionsoft.com>
Date: Tue, 24 Apr 2001 11:44:14 +0100
Message-ID: <3AE558FE.B38F481A@decisionsoft.com>
To: "xmlschema-dev@w3.org" <xmlschema-dev@w3.org>
Is it legal XSDL to define an infinitely recursive structure?  For
example (in XSDL shorthand):

<element name="foo" type="bar" />
<complexType name="bar">
  <element name="foo" type="bar" minOccurs="1" maxOccurs="1"/>
</complexType>

I can imagine this would be fine if minOccurs="0" because it could
conceivably terminate, however with minOccurs="1" an instance document
with a "foo" element in it would be infinite and impossible to generate.

Ian.
-- 
Ian Stokes-Rees                       DecisionSoft Ltd.
Telephone: +44-1865-203192            http://www.decisionsoft.com
Received on Tuesday, 24 April 2001 06:55:56 GMT

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