SourceForge has been redesigned. Learn more.
Close

#732 Schema: multiple chameleon includes

v9.0
closed
5
2012-10-08
2007-11-10
Michael Kay
No

If a no-namespace schema document is included more than once, by schema documents with different target namespaces, then Saxon only creates one component for each definition in the included document, using the target namespace of the document that did the first include.

The correct action here is (probably!) to create one distinct component for each (definition, targetNamespace) pair. So if A (targetNamespace=A) includes X, and B (targetNamespace=B) also includes X, then each definition in B results in two components, one in namespace A and one in namespace B.

The problem is present in 9.0 and all previous releases. The fix is fairly simple and appears unrisky so it will be included in a future maintenance release.

[For my reference: the change is to change the key of the hashtable documentsAlreadyRead in SchemaCompiler to be a composite of the absolute URI of the included schema document and the targetNamespace expected by the referrer]

Discussion

  • Michael Kay

    Michael Kay - 2007-11-10

    Logged In: YES
    user_id=251681
    Originator: YES

    Test case compos/c001 added.

     
  • Michael Kay

    Michael Kay - 2007-12-01

    Logged In: YES
    user_id=251681
    Originator: YES

    Fixed in 9.0.0.2