1. Cocoon
  2. COCOON-2104

[PATCH] Add base URI fixup support to XIncludeTransformer


    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.11, 2.2
    • Fix Version/s: 2.1.12, 2.2.1
    • Component/s: * Cocoon Core
    • Labels:
    • Other Info:
      Patch available
    • Affects version (Component):
      Components: Pipeline
    • Fix version (Component):
      Components: Pipeline


      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 specification
      1. baseFixup-2.2-r561499.diff
        6 kB
        Andrew Cave
      2. baseFixup-2.1-r561455.diff
        6 kB
        Andrew Cave


        Andrew Cave created issue -
        Andrew Cave made changes -
        Field Original Value New Value
        Attachment baseFixup-2.2-r561499.diff [ 12362914 ]
        Andrew Cave made changes -
        Attachment baseFixup-2.1-r561455.diff [ 12362915 ]
        Grzegorz Kossakowski made changes -
        Fix Version/s 2.2-dev (Current SVN) [ 12310611 ]
        Fix Version/s 2.1.11 [ 12312231 ]
        Jörg Heinicke made changes -
        Assignee Jörg Heinicke [ ]
        Jasha Joachimsthal made changes -
        Assignee Jörg Heinicke [ ] Jasha Joachimsthal [ jashajoachimsthal ]
        Jasha Joachimsthal made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Fix version (Component) Parent values: Components: Pipeline(10228).
        Affects version (Component) Parent values: Components: Pipeline(10157).
        Fix Version/s 2.1.12-dev (Current SVN) [ 12312903 ]
        Fix Version/s 2.2-dev (Current SVN) [ 12313093 ]
        Resolution Fixed [ 1 ]


          • Assignee:
            Jasha Joachimsthal
            Andrew Cave
          • Votes:
            1 Vote for this issue
            0 Start watching this issue


            • Created: