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"/>

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 Stokes-Rees                       DecisionSoft Ltd.
Telephone: +44-1865-203192            http://www.decisionsoft.com
Received on Tuesday, 24 April 2001 06:55:56 UTC

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