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/01/13 16:19:54 UTC
svn commit: r1432632 -
/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/xml/XsltUriResolver.java
Author: davsclaus
Date: Sun Jan 13 15:19:54 2013
New Revision: 1432632
URL: http://svn.apache.org/viewvc?rev=1432632&view=rev
Log:
CAMEL-5962: When using XSLT includes will use same file or classpath loading as endpoint configuration, if not explicit configured.
Modified:
camel/trunk/camel-core/src/main/java/org/apache/camel/builder/xml/XsltUriResolver.java
Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/builder/xml/XsltUriResolver.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/xml/XsltUriResolver.java?rev=1432632&r1=1432631&r2=1432632&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/builder/xml/XsltUriResolver.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/builder/xml/XsltUriResolver.java Sun Jan 13 15:19:54 2013
@@ -69,12 +69,11 @@ public class XsltUriResolver implements
LOG.trace("Resolving URI with href: {} and base: {}", href, base);
String scheme = ResourceHelper.getScheme(href);
- if (scheme != null && "file:".equals(scheme)) {
- // need to compact paths for file as it can be relative paths using .. to go backwards
- href = FileUtil.compactPath(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)) {
+ href = FileUtil.compactPath(href);
+ }
LOG.debug("Resolving URI from {}: {}", scheme, href);
InputStream is;