servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r640836 - in /servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-saxon/src: main/java/org/apache/servicemix/saxon/XsltEndpoint.java test/resources/default.xsl test/resources/transform.xsl
Date Tue, 25 Mar 2008 14:44:49 GMT
Author: gnodet
Date: Tue Mar 25 07:44:46 2008
New Revision: 640836

URL: http://svn.apache.org/viewvc?rev=640836&view=rev
Log:
SM-1286: Saxon does not resolve xsl imports / includes relative to the location

Added:
    servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-saxon/src/test/resources/default.xsl
      - copied unchanged from r640833, servicemix/smx3/trunk/deployables/serviceengines/servicemix-saxon/src/test/resources/default.xsl
Modified:
    servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-saxon/src/main/java/org/apache/servicemix/saxon/XsltEndpoint.java
    servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-saxon/src/test/resources/transform.xsl

Modified: servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-saxon/src/main/java/org/apache/servicemix/saxon/XsltEndpoint.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-saxon/src/main/java/org/apache/servicemix/saxon/XsltEndpoint.java?rev=640836&r1=640835&r2=640836&view=diff
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-saxon/src/main/java/org/apache/servicemix/saxon/XsltEndpoint.java
(original)
+++ servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-saxon/src/main/java/org/apache/servicemix/saxon/XsltEndpoint.java
Tue Mar 25 07:44:46 2008
@@ -129,16 +129,16 @@
     }
 
     protected Source createXsltSource(Resource res) throws Exception {
+        String url = null;
+        try {
+            url = res.getURL().toURI().toString();
+        } catch (Exception e) {
+            // Ignore
+        }
         if (useDomSourceForXslt) {
-            String url = null;
-            try {
-                url = res.getURL().toURI().toString();
-            } catch (Exception e) {
-                // Ignore
-            }
             return new DOMSource(parse(res), url);
         } else {
-            return new StreamSource(res.getInputStream());
+            return new StreamSource(res.getInputStream(), url);
         }
     }
 

Modified: servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-saxon/src/test/resources/transform.xsl
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-saxon/src/test/resources/transform.xsl?rev=640836&r1=640835&r2=640836&view=diff
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-saxon/src/test/resources/transform.xsl
(original)
+++ servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-saxon/src/test/resources/transform.xsl
Tue Mar 25 07:44:46 2008
@@ -21,6 +21,8 @@
   xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
   version='1.0'>
 
+  <xsl:import href="default.xsl" />
+
   <xsl:output method="xml" indent="yes" encoding="ISO-8859-1"/>
 
   <xsl:template match="/">



Mime
View raw message