https://issues.apache.org/bugzilla/show_bug.cgi?id=50289
Summary: xslt task does not use the classpath attribute to find
XSLT processor
Product: Ant
Version: 1.8.1
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Core tasks
AssignedTo: [email protected]
ReportedBy: [email protected]
Overview:
The XSLT task <http://ant.apache.org/manual/Tasks/style.html> has an optional
"classpath" attribute for specifying the "the classpath to use when looking up
the XSLT processor".
This is not happening and any XSLT processor is referenced by the classpath
attribute is not getting used.
STEPS TO REPRODUCE
Detailed steps were written in:
https://issues.apache.org/bugzilla/show_bug.cgi?id=41314 (along with sample
files). Essentially, trying to reference an XSLT 2.0 processor (namely SAXON)
in the classpath attribute.
Actual results: the task uses the default Java XSLT processor (which is an XSLT
1.0 processor).
Expected results: the task uses the XSLT 2.0 processor found inside the JAR
file that is in the classpath attribute.
BUILD
This bug (re)appears in Ant 1.8.1.
This bug is not present in Ant 1.8.0, 1.7.1 and 1.7.0. (Though it runs about 5
times slower on release 1.8.0 than the others.)
Have reproduced this bug in release 1.8.1, and the success of the other
releases, on Microsoft Windows XP and Mac OS 10.6.4.
ADDITIONAL INFORMATION
If there is an explicit XSLT factory class specified then the classpath
attribute is always not used, even though it is expected that it would be used.
That is, this will work
<xslt ... classpath="/Users/.../saxon9.jar">
</xslt>
but this will not work:
<xslt ... classpath="/Users/.../saxon9.jar">
<factory name="net.sf.saxon.TransformerFactoryImpl"/>
</xslt>
even though the first example should be implicitly picking the class which was
explicitly specified in the second example.
This problem with an explicit factory occurs with release 1.8.1 as well as in
1.8.0, 1.7.1 and 1.7.0. So it seems the code for using the classpath attribute
is conditional on whether a factory element exists or not.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.