cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Cave (JIRA)" <>
Subject [jira] Created: (COCOON-2104) [PATCH] Add base URI fixup support to XIncludeTransformer
Date Tue, 31 Jul 2007 20:50:52 GMT
[PATCH] Add base URI fixup support to XIncludeTransformer

                 Key: COCOON-2104
             Project: Cocoon
          Issue Type: Bug
          Components: * Cocoon Core
    Affects Versions: 2.1.11-dev (Current SVN), 2.2-dev (Current SVN)
            Reporter: Andrew Cave
            Priority: Minor
             Fix For: 2.1.11-dev (Current SVN), 2.2-dev (Current SVN)
         Attachments: baseFixup-2.1-r561455.diff, baseFixup-2.2-r561499.diff

As discussed at [1], the XIncludeTransformer fails to perform the base URI fixup specified
in the W3C's XInclude spec [2]. The spec says that the base URIs of elements do not change
when passed through a conformant XInclude processor. Meaning, xml:base attributes must be
added to the result set. The reason being that relative URIs in the included document should
not break; this provides a mechanism to resolve them properly.

This patch results in the XIncludeTransformer adding xml:base attributes to top-level included
elements. It does this only when the the base URI of the included element differs from the
base URI of the parent element (meaning: for almost every case except where the included document
is the current document).

The XIncludeTransformer's JUnit test is also updated by this patch to reflect the fact that
the resulting XML file (xinclude-result-1.xml) has an xml:base attribute added.

[2] - The Base URI Fixup section of the W3C's XInclude

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message