[Yanel-commits] rev 33015 - public/yanel/trunk/src/impl/java/org/wyona/yanel/impl/resources

josias at wyona.com josias at wyona.com
Thu Mar 6 13:53:46 CET 2008


Author: josias
Date: 2008-03-06 13:53:45 +0100 (Thu, 06 Mar 2008)
New Revision: 33015

Modified:
   public/yanel/trunk/src/impl/java/org/wyona/yanel/impl/resources/BasicXMLResource.java
Log:
set the uriresolver for the transformer factory to make xsl:include work. thanks to Evaldas Taroza for the patch.

Modified: public/yanel/trunk/src/impl/java/org/wyona/yanel/impl/resources/BasicXMLResource.java
===================================================================
--- public/yanel/trunk/src/impl/java/org/wyona/yanel/impl/resources/BasicXMLResource.java	2008-03-06 12:30:53 UTC (rev 33014)
+++ public/yanel/trunk/src/impl/java/org/wyona/yanel/impl/resources/BasicXMLResource.java	2008-03-06 12:53:45 UTC (rev 33015)
@@ -235,14 +235,16 @@
             xmlReader.setEntityResolver(catalogResolver);
             xmlReader.setFeature("http://xml.org/sax/features/namespace-prefixes", true);
 
+            SourceResolver uriResolver = new SourceResolver(this);
+            
             // create xslt transformer:
             SAXTransformerFactory tf = (SAXTransformerFactory)TransformerFactory.newInstance();
+            tf.setURIResolver(uriResolver);
 
             String[] xsltPaths = viewDescriptor.getXSLTPaths();
             if (xsltPaths == null || xsltPaths.length == 0) {
                 xsltPaths = getXSLTPath(getPath());
             }
-            SourceResolver uriResolver = new SourceResolver(this);
             
             TransformerHandler[] xsltHandlers = new TransformerHandler[xsltPaths.length];
             for (int i = 0; i < xsltPaths.length; i++) {



More information about the Yanel-commits mailing list