[Yanel-dev] Using resolver to resolve XSLT paths in the case of BasicXMLResource

Michael Wechner michael.wechner at wyona.com
Sat Apr 5 13:55:51 CEST 2008


Hi

I think it would be nice to use a resolver in the case of the 
BasicXMLResource, such that one can also use it "globally"


+                // TODO: Use resolver
+                if (xsltPaths[i].startsWith("file:")) {
+                    log.warn("Scheme: file (" + xsltPaths[i] + ")");
+                    xsltHandlers[i] = tf.newTransformerHandler(new 
StreamSource(new java.io.FileInputStream(xsltPaths[i].substring(5))));
+                } else {
+                    xsltHandlers[i] = tf.newTransformerHandler(new 
StreamSource(repo.getNode(xsltPaths[i]).getInputStream()));
+                }


I have added the following lines as a step to accomplish.

Cheers

Michi

-- 
Michael Wechner
Wyona      -   Open Source Content Management - Yanel, Yulup
http://www.wyona.com
michael.wechner at wyona.com, michi at apache.org
+41 44 272 91 61



More information about the Yanel-development mailing list