W3C home > Mailing lists > Public > xmlschema-dev@w3.org > January 2003

RE: infinite loop

From: Allan Jones <allan.jones@hyfinity.com>
Date: Fri, 10 Jan 2003 10:56:23 -0000
To: <xmlschema-dev@w3.org>
Message-ID: <LAENININNOKBCAKCLEFIAENHCBAA.allan.jones@hyfinity.com>


While we're on the subject of infinite loops, does anyone have any idea how
to detect an infinite loop in a schema programatically?  Particularly, i'd
like to use xslt to detect and infinite loop in an xsd schema.  I've been
wondering about this for a while, but haven't been able to find anything out
by hunting on the web or reading up on the subject.  So far, the only idea
i've had was to recurse element by element as if creating an instance
document from the schema (similar to your chapter in the professional xml
schemas book, Jeni) and waiting to see if it crashes the processor or not.
Obviously, I'd prefer not to have to resort to that!

Does anyone have any ideas?


Allan Jones

|-----Original Message-----
|From: xmlschema-dev-request@w3.org
|[mailto:xmlschema-dev-request@w3.org]On Behalf Of Jeni Tennison
|Sent: 09 January 2003 15:27
|To: Jeff Rafter
|Cc: xmlschema-dev@w3.org
|Subject: Re: infinite loop
|Hi Jeff,
|>> There's nothing to stop you from creating these schemas, though of
|>> course you won't be able to write any documents that are valid
|>> against it.
|> Does the Particle Emptiable constraint [1] in 3.9.6 come into play
|> here? It seems that the declaration is in fact declaring particles
|> and the constraint says that it must be emptiable. The minimum
|> effective total range [2] for Jeni's example is > 0. the Particle
|> Emptiable is explicitly referenced from the element validity
|> assessment section for mixed declarations (which Oliver's example
|> was...) but as Jeni pointed out his declaration was emptiable
|> because of the minOccurs = 0 on the choice. Now, that said, I don't
|> know of any editor that enforces that rule...
|The Particle Emptiable constraint mainly comes into play when checking
|whether a particular derivation by restriction is OK and, as you point
|out, when checking whether it's legal to specify the default value for
|an element (it's only legal if the type of the element is simple or if
|it's mixed and emptiable).
|None of this (as far as I can tell) makes any difference to whether a
|recursive standalone type definition is legal or not, so I don't think
|that Particle Emptiable comes into play here. I may have missed
|something though.
|Jeni Tennison
Received on Friday, 10 January 2003 06:33:52 UTC

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