DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=29596>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=29596

XSLT task ignores classpath element/attribute when looking up transformer





------- Additional Comments From [EMAIL PROTECTED]  2004-06-16 10:56 -------
Proposed patches to implement -

diff -u -r1.85 XSLTProcess.java
--- XSLTProcess.java    16 Apr 2004 09:59:02 -0000      1.85
+++ XSLTProcess.java    16 Jun 2004 10:53:00 -0000
@@ -414,7 +414,7 @@
      * @return the requested class.
      * @exception Exception if the class could not be loaded.
      */
-    private Class loadClass(String classname) throws Exception {
+    public Class loadClass(String classname) throws Exception {
         if (classpath == null) {
             return Class.forName(classname);
         } else {

diff -u -r1.35 TraXLiaison.java
--- TraXLiaison.java    9 Mar 2004 16:48:15 -0000       1.35
+++ TraXLiaison.java    16 Jun 2004 10:53:49 -0000
@@ -66,6 +66,9 @@
      */
     private String factoryName = null;

+    /** the owning XSLT task */
+    private XSLTProcess xsltTask = null;
+
     /** The trax TransformerFactory */
     private TransformerFactory tfactory = null;

@@ -259,7 +262,7 @@
             tfactory = TransformerFactory.newInstance();
         } else {
             try {
-                Class clazz = Class.forName(factoryName);
+                Class clazz = xsltTask.loadClass(factoryName);
                 tfactory = (TransformerFactory) clazz.newInstance();
             } catch (Exception e) {
                 throw new BuildException(e);
@@ -401,6 +404,8 @@
      *        is to be configured.
      */
     public void configure(XSLTProcess xsltTask) {
+        this.xsltTask = xsltTask;
+
         XSLTProcess.Factory factory = xsltTask.getFactory();
         if (factory != null) {
             setFactory(factory.getName());
@@ -413,6 +418,8 @@
                 setAttribute(attr.getName(), attr.getValue());
             }
         }
+
+

         XMLCatalog xmlCatalog = xsltTask.getXMLCatalog();
         // use XMLCatalog as the entity resolver and URI resolver

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to