RE: infinite loop

Hi,

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?

Regards,

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.
|
|Cheers,
|
|Jeni
|
|---
|Jeni Tennison
|http://www.jenitennison.com/
|
|
|

Received on Friday, 10 January 2003 06:33:52 UTC