W3C home > Mailing lists > Public > xmlschema-dev@w3.org > May 2002

Re: Circular types in XML Schemas

From: Jeni Tennison <jeni@jenitennison.com>
Date: Wed, 1 May 2002 18:16:23 +0100
Message-ID: <120807936681.20020501181623@jenitennison.com>
To: Yuri de Wit <yuri.dewit@metaserver.com>
CC: "'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org>
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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:01 UTC