Browse Source

<xslt> ignores classpath when defaulting to TraX. PR 49271

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@943143 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 15 years ago
parent
commit
a26365ccc4
2 changed files with 14 additions and 4 deletions
  1. +3
    -0
      WHATSNEW
  2. +11
    -4
      src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java

+ 3
- 0
WHATSNEW View File

@@ -20,6 +20,9 @@ Fixed bugs:
* The MIME mailer ignored the port parameter when using SSL.
Bugzilla Report 49267.

* <xslt> ignored the classpath when using the default TraX processor.
Bugzilla Report 49271.

Other changes:
--------------



+ 11
- 4
src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java View File

@@ -108,6 +108,10 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger {
/** for resolving entities such as dtds */
private XMLCatalog xmlCatalog = new XMLCatalog();

/** Name of the TRAX Liaison class */
private static final String TRAX_LIAISON_CLASS =
"org.apache.tools.ant.taskdefs.optional.TraXLiaison";

/** Utilities used for file operations */
private static final FileUtils FILE_UTILS = FileUtils.getFileUtils();

@@ -670,13 +674,15 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger {
* @exception Exception if the processor cannot be loaded.
*/
private void resolveProcessor(String proc) throws Exception {
String classname;
if (proc.equals(PROCESSOR_TRAX)) {
liaison = new org.apache.tools.ant.taskdefs.optional.TraXLiaison();
classname = TRAX_LIAISON_CLASS;
} else {
//anything else is a classname
Class clazz = loadClass(proc);
liaison = (XSLTLiaison) clazz.newInstance();
classname = proc;
}
Class clazz = loadClass(classname);
liaison = (XSLTLiaison) clazz.newInstance();
}

/**
@@ -910,7 +916,8 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger {
} else {
try {
resolveProcessor(PROCESSOR_TRAX);
} catch (Exception e1) { // should not happen
} catch (Throwable e1) {
e1.printStackTrace();
handleError(e1);
}
}


Loading…
Cancel
Save