Skip to content
This repository was archived by the owner on Sep 6, 2025. It is now read-only.
This repository was archived by the owner on Sep 6, 2025. It is now read-only.

When includes are nested more than two levels deep, the base URI is not preserved #28

@ndw

Description

@ndw

This is the root cause of xmlcalabash/xmlcalabash3#321

If you build a document from the bottom up, as XInclude does, and you preserve the base URI, as XInclude does, a problem arises when nesting is more than two levels deep. Suppose A includes B includes C. When you process C, you record its base URI and it gets incorporated into the result returned for B. That's fine. Now when you process B, you record its base URI and it gets incorporated into A. Therein lies the rub. C is already included in B. When B gets included in A, the base URI associated with B gets applied to all of B, including C within it. This isn't a problem when fixupXmlBase is true because the xml:base attribute added at each level will override the base URI being applied.

But when fixupXmlBase is false, there's nothing to override the base URI.

This isn't a practically solvable problem in Saxon, so we'll have to do it here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions