Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-12713

relative paths can remove scheme from xslt URI

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.22.0
    • Fix Version/s: 2.21.3, 2.22.1, 2.23.0
    • Component/s: camel-core
    • Labels:
    • Patch Info:
      Patch Available
    • Estimated Complexity:
      Unknown
    • Flags:
      Patch

      Description

      When using relative paths in an XSLT referenced from another one, the used URI scheme may be ignored.

      e.g. in case of an XSLT specified by URI "classpath:location/master.xsl",  that includes another one:  <xsl:include href="../child.xsl"/>

      In this case, the URI of child.xsl is resolved as just "child.xsl" instead of "classpath:child.xsl", omitting the URI scheme.

      The cause is XsltUriResolver, in which FileUtil.compactPath() is used to calculate the relative URI, but this call ignores the colon separator and considers "classpath:location" as a single path part.

      I'm creating a pull request which passes the URI without scheme to FileUtil.compactPath().

        Attachments

          Activity

            People

            • Assignee:
              davsclaus Claus Ibsen
              Reporter:
              pvdbosch Peter Van den Bosch
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: