- From: Morris Matsa <mmatsa@us.ibm.com>
- Date: Wed, 1 May 2002 13:29:50 -0400
- To: Jeni Tennison <jeni@jenitennison.com>
- Cc: Yuri de Wit <yuri.dewit@metaserver.com>, "'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org>
I believe that necessarily infinitely recursive unsatisfiable types are forbidden in Schemas. This question was answered about a year ago on this list [1], and the part of the schema spec quoted then was [2]. Please tell me if I'm wrong. Jeni is of course right that you should always test with an instance anyway. I don't know if current schema processors are picking this up in schemas when unused by instances. [1] http://lists.w3.org/Archives/Public/xmlschema-dev/2001May/0053.html [2] http://www.w3.org/TR/xmlschema-1/#cos-group-emptiable Jeni Tennison <jeni@jenitennison.com>@w3.org on 05/01/2002 01:16:23 PM Please respond to Jeni Tennison <jeni@jenitennison.com> Sent by: xmlschema-dev-request@w3.org To: Yuri de Wit <yuri.dewit@metaserver.com> cc: "'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org> Subject: 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:30:32 UTC