Project

Profile

Help

Bug #3531

open

Substitution groups are not merged

Added by Michael Kay about 7 years ago. Updated almost 5 years 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:
Platforms:

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.

Actions #1

Updated by Michael Kay about 7 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.

Actions #2

Updated by Michael Kay almost 5 years 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