This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 4135 - Microsoft "schema" test set, schU1 (circular redefines)
Summary: Microsoft "schema" test set, schU1 (circular redefines)
Status: NEW
Alias: None
Product: XML Schema Test Suite
Classification: Unclassified
Component: Microsoft tests (show other bugs)
Version: 2006-11-06
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Henry S. Thompson
QA Contact: XML Schema Test Suite mailing list
URL:
Whiteboard:
Keywords: disputedSpec
: 4134 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-01-02 18:17 UTC by Michael Kay
Modified: 2010-06-04 16:04 UTC (History)
1 user (show)

See Also:


Attachments

Description Michael Kay 2007-01-02 18:17:26 UTC
In the Microsoft "schema" test set, test

   <test group="schU1" name="schU1"/>

there are two schema documents, each of which redefines the other. The metadata indicates that this is considered valid.

I can't find an explicit ban on circular redefines. However, I believe there is an implicit ban. XML Schema Part 1 Schema Representation Constraint: Redefinition Constraints and Semantics states:

If the ·actual value· of the schemaLocation [attribute] successfully resolves [then] it resolves to [something which] corresponds to a <schema> element information item in a well-formed information set, which in turn corresponds to a valid schema.

In the presence of circular redefines, I don't believe that this rule is decideable. You can't determine whether the information set corresponds to a valid schema without processing the xs:redefines, and this leads to infinite regress.

(Perhaps this is wriggling. The same argument could be used to disallow circular xs:include. However, it's relatively easy to find an algorithm for determining that either all the xs:include directives in a cycle are valid, or none of them are. Because of the special semantics of xs:redefine, it's far less clear that such an algorithm exists in this case.)
Comment 1 Michael Kay 2007-01-11 00:14:29 UTC
*** Bug 4134 has been marked as a duplicate of this bug. ***
Comment 2 Zafar Abbas 2007-02-02 19:37:34 UTC
Agreed that this test should not be published as a compliance test. We are
following up with the WG to determine the process of updating the test suite.
Comment 3 Henry S. Thompson 2010-01-29 15:42:25 UTC
Looks to me like the WG needs to rule on this: does the spec. allow circular 
redefines, or not?
Comment 4 C. M. Sperberg-McQueen 2010-06-04 16:04:54 UTC
One problem here is the parallel to circular includes.  The spec neither explicitly licenses nor explicitly forbids either circular inclusion nor circular redefinition, and implementations differ in whether they allow them or not.

The interpretation of circular include as legal seems to depend on the idea that there is a fixed-point semantics for inclusion under which circular inclusions are perfectly well defined.

The same sort of fixed-point semantics can be applied to circular redefine in at least some cases.  Many people seem to shy away from this as too horrible to contemplate.

But if the spec is assumed to have silently assumed a fixed-point semantics for the one, then why not for the other?