Re: Circular types in XML Schemas

Hi Yuri,

> What does the XML Schema specification says about infinite recursive
> types, i.e. the ones that do not have a minOccurs="0" as a loophole?

As far as I know, nothing. I think that it's quite difficult for a
schema validator to test for this kind of unsatisfiable schema, though
you'd find out soon enough that there was something wrong if you
tested the schema against any instance document!

In general, the schema component constraints don't test every thing
you could do to make it impossible for an instance to validate against
your schema. For example, it's very easy to create identity
constraints that are unsatisfiable (because they try to select nodes
that don't exist), or to create simple types that have no valid
lexical representations (because you use a pattern that doesn't match
the base type, for example). It's therefore essential, during
development, to test schemas against instance document that you know
are valid.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/

Received on Wednesday, 1 May 2002 13:16:24 UTC