Author: davsclaus
Date: Sun Jan 13 15:20:37 2013
New Revision: 1432633
URL: http://svn.apache.org/viewvc?rev=1432633&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/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:r1432632
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=1432633&r1=1432632&r2=1432633&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
Sun Jan 13 15:20:37 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;