Camel
  1. Camel
  2. CAMEL-5195

XSLTUriResolver fails to include from classpath under windows

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.9.0
    • Fix Version/s: 2.9.3, 2.10.0
    • Component/s: camel-core, camel-xslt
    • Labels:
    • Environment:

      Windows

    • Estimated Complexity:
      Novice

      Description

      org.apache.camel.builder.xml.XsltUriResolver uses File.separator to separate classpath parts instead of simply '/'. This prevents <xsl:include /> to work under windows when the including xslt is located in a subfolder of the classpath.

        Activity

        Hide
        Claus Ibsen added a comment -

        Thanks

        Show
        Claus Ibsen added a comment - Thanks
        Hide
        Julien G-B added a comment -

        Thanks for the patch, it fixes the problem.

        In case you still need the info, the endpoint:

        <to uri="xslt:xslt/transform.xsl" />
        

        the include:

        <xsl:stylesheet [...]>
        	<xsl:include href="included.xsl" />
        [...]
        

        Both transform.xsl and included.xsl are in the "/xslt" path of an OSGi bundle deployed to Fuse ESB/Apache Servicemix.

        Show
        Julien G-B added a comment - Thanks for the patch, it fixes the problem. In case you still need the info, the endpoint: <to uri= "xslt:xslt/transform.xsl" /> the include: < xsl:stylesheet [...]> < xsl:include href= "included.xsl" /> [...] Both transform.xsl and included.xsl are in the "/xslt" path of an OSGi bundle deployed to Fuse ESB/Apache Servicemix.
        Hide
        Claus Ibsen added a comment -

        I have committed a fix on trunk and 2.9 branch. You are welcome to give the SNAPSHOT a try on your system.

        Show
        Claus Ibsen added a comment - I have committed a fix on trunk and 2.9 branch. You are welcome to give the SNAPSHOT a try on your system.
        Hide
        Claus Ibsen added a comment -

        Can you post your xslt endpoint, and snippets from your xslt template where you use xsl:include.
        Mind that if you do not specfify a scheme in xsl:include, then its interpreted as relative to the path from the xstl endpoint.

        Show
        Claus Ibsen added a comment - Can you post your xslt endpoint, and snippets from your xslt template where you use xsl:include. Mind that if you do not specfify a scheme in xsl:include, then its interpreted as relative to the path from the xstl endpoint.

          People

          • Assignee:
            Claus Ibsen
            Reporter:
            Julien G-B
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development