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

"Costello, Roger L." <[email protected]> Sat, 25 Aug 2012 21:12:02 +0000
Newsgroups gmane.text.xml.schema.devel
Message-ID <[email protected]>
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?

/Roger


-----Original Message-----
From: Liam R E Quin [mailto:[email protected]] 
Sent: Saturday, August 25, 2012 3:24 PM
To: Costello, Roger L.
Cc: [email protected]
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

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