Bug #3531

Updated by Michael Kay about 4 years ago

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.