W3C home > Mailing lists > Public > xmlschema-dev@w3.org > August 2012

RE: Is this the complete list of ways to create recursion in XML Schemas?

From: Costello, Roger L. <costello@mitre.org>
Date: Sat, 25 Aug 2012 21:12:02 +0000
To: "xmlschema-dev@w3.org" <xmlschema-dev@w3.org>
Message-ID: <B5FEE00B53CF054AA8439027E8FE17751E630654@IMCMBX04.MITRE.ORG>
Thanks Liam.

> Recursion via substitution groups

Here is an example of circular substitutionGroups:

    <xsd:element name="Subway" substitutionGroup="Metro" type="xsd:string" />
    <xsd:element name="Metro" substitutionGroup="Subway" type="xsd:string" />

However, when I validated this schema I got an error, saying circular substitutionGroups are not allowed.

Is that correct, circular substitutionGroups are not allowed?


-----Original Message-----
From: Liam R E Quin [mailto:liam@w3.org] 
Sent: Saturday, August 25, 2012 3:24 PM
To: Costello, Roger L.
Cc: xmlschema-dev@w3.org
Subject: Re: Is this the complete list of ways to create recursion in XML Schemas?

On Sat, 2012-08-25 at 15:10 +0000, Costello, Roger L. wrote:
> Hi Folks,

> Is that the complete list? Are there any other ways to create
> recursion in XML Schemas?

Some others:

Indirect recursion - element A contains B which can contain A...

Recursion via substitution groups

Co-occurrence can quickly become co-dependency: you can make mutual
dependencies with id/idref for example.


Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
Pictures from old books: http://fromoldbooks.org/
Ankh: irc.sorcery.net irc.gnome.org freenode/#xml
Co-author, "Head First Namespaces", due out 1st April 2013
Received on Saturday, 25 August 2012 21:12:31 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:20 UTC