cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1124246 - /cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/XSLTJaxbProvider.java
Date Wed, 18 May 2011 13:08:42 GMT
Author: dkulp
Date: Wed May 18 13:08:42 2011
New Revision: 1124246

URL: http://svn.apache.org/viewvc?rev=1124246&view=rev
Log:
Set the UIRResolver on the transformer to work around issue #1 with it
on the IBM jdk

Modified:
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/XSLTJaxbProvider.java

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/XSLTJaxbProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/XSLTJaxbProvider.java?rev=1124246&r1=1124245&r2=1124246&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/XSLTJaxbProvider.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/XSLTJaxbProvider.java
Wed May 18 13:08:42 2011
@@ -298,7 +298,7 @@ public class XSLTJaxbProvider extends JA
             }
         }
         
-        TemplatesImpl templ =  new TemplatesImpl(templates);
+        TemplatesImpl templ =  new TemplatesImpl(templates, uriResolver);
         MessageContext mc = getContext();
         if (mc != null) {
             UriInfo ui = mc.getUriInfo();
@@ -366,11 +366,13 @@ public class XSLTJaxbProvider extends JA
     private static class TemplatesImpl implements Templates {
 
         private Templates templates;
+        private URIResolver resolver;
         private Map<String, Object> transformParameters = new HashMap<String, Object>();
         private Map<String, String> outProps = new HashMap<String, String>();
         
-        public TemplatesImpl(Templates templates) {
+        public TemplatesImpl(Templates templates, URIResolver resolver) {
             this.templates = templates;
+            this.resolver = resolver;
         }
         
         public void setTransformerParameter(String name, Object value) {
@@ -387,6 +389,7 @@ public class XSLTJaxbProvider extends JA
 
         public Transformer newTransformer() throws TransformerConfigurationException {
             Transformer tr = templates.newTransformer();
+            tr.setURIResolver(resolver);
             for (Map.Entry<String, Object> entry : transformParameters.entrySet())
{
                 tr.setParameter(entry.getKey(), entry.getValue());
             }



Mime
View raw message