Project

Profile

Help

Bug #3531

Substitution groups are not merged

Added by Michael Kay over 2 years ago. Updated 6 months ago.

Status:
New
Priority:
Normal
Assignee:
Start date:
2017-11-16
Due date:
% Done:

0%

Estimated time:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Found in version:
Fixed in version:

Description

Taking this over as a sub-problem of bug #3202.

MHK IntelliJ project Saxon9.8/XBRLTest

When there are several independent calls on SchemaManager.load(), each call on load() results in a new PreparedSchema being built; and if the schema is then found to be valid, its components are merged into the global schema for the Configuration. (We carefully avoid making any changes to the global schema until the new local schema has been verified as being valid.)

If two of these calls on load() specify two different schemas which both import some common schema, it's possible that either or both may declare elements to be in the substitution group of some element declaration in the common schema. When this happens then the process of merging the local schema into the global schema should form the union of the two substitution groups (and in turn, this should trigger recompilation of any affected types). This is not happening: we use one element declaration or the other, but we never merge them in this way.

The logic is complicated by xs:redefine, but let's focus on getting it right in the absence of xs:redefine.

History

#1 Updated by Michael Kay over 2 years ago

I wrote a simple unit test to demonstrate the problem (TestValidator/testMergeSubstitutionGroups). This test is failing on the status quo code, but it succeeds after making the change documented under bug #3202 to maintain the cache of loaded schema documents at global level rather than within a particular schema compiler.

However, this is not the end of the matter, because although this unit test is now passing, the complex XBRL test case is still failing.

#2 Updated by Michael Kay 6 months ago

  • Project changed from Saxon to Non-Conformances
  • Description updated (diff)
  • Category deleted (Schema conformance)

Please register to edit this issue

Also available in: Atom PDF