You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2013/03/15 07:38:39 UTC

svn commit: r1456780 - in /camel/branches/camel-2.10.x: ./ camel-core/src/main/java/org/apache/camel/builder/xml/XsltUriResolver.java

Author: davsclaus
Date: Fri Mar 15 06:38:39 2013
New Revision: 1456780

URL: http://svn.apache.org/r1456780
Log:
xslt component has problem loading resource from classpath on windows.

Modified:
    camel/branches/camel-2.10.x/   (props changed)
    camel/branches/camel-2.10.x/camel-core/src/main/java/org/apache/camel/builder/xml/XsltUriResolver.java

Propchange: camel/branches/camel-2.10.x/
------------------------------------------------------------------------------
  Merged /camel/trunk:r1456549

Propchange: camel/branches/camel-2.10.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: camel/branches/camel-2.10.x/camel-core/src/main/java/org/apache/camel/builder/xml/XsltUriResolver.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.10.x/camel-core/src/main/java/org/apache/camel/builder/xml/XsltUriResolver.java?rev=1456780&r1=1456779&r2=1456780&view=diff
==============================================================================
--- camel/branches/camel-2.10.x/camel-core/src/main/java/org/apache/camel/builder/xml/XsltUriResolver.java (original)
+++ camel/branches/camel-2.10.x/camel-core/src/main/java/org/apache/camel/builder/xml/XsltUriResolver.java Fri Mar 15 06:38:39 2013
@@ -71,8 +71,12 @@ public class XsltUriResolver implements 
         String scheme = ResourceHelper.getScheme(href);
         if (scheme != null) {
             // need to compact paths for file/classpath as it can be relative paths using .. to go backwards
-            if ("file:".equals(scheme) || "classpath:".equals(scheme)) {
+            if ("file:".equals(scheme)) {
+                // compact path use file OS separator
                 href = FileUtil.compactPath(href);
+            } else if ("classpath:".equals(scheme)) {
+                // for classpath always use /
+                href = FileUtil.compactPath(href, '/');
             }
             LOG.debug("Resolving URI from {}: {}", scheme, href);