ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Barry Kaplan" <inthepres...@home.com>
Subject XSLTProcessor & using xsl file from jar file
Date Sun, 18 Nov 2001 21:52:39 GMT
I have a [java] task needs to use XSLTProcessor (ie, <style>). My xsl file
is in the jar file with the task. All the other file-like parameters to
<style> are of type File, except the xsl-file. XSLTProcessor.execute()
invokes:

  File stylesheet = project.resolveFile(xslFile);

This does not seem to handle Url correctly. For example, the value of
xslFile might be:

  jar:file:\c:\somewhere\myjar.jar!\com\abwg\tools\ant\ConvertToJbuilder.xsl

But the result of resolveFile returns:


c:\somewhere\jar:file:\c:\somewhere\myjar.jar!\com\abwg\tools\ant\ConvertToJ
builder.xsl


So, what does one generally do in the ant world?
a) Forget about using <style> and roll my own xslt code?
b) Refactor XSLProcessor to accept a File argument for the xsl parameter (to
be consistent
   with all its other file-like arguments)?
c) Refactor Project.resolveFile() to handle URLs correctly?
d) Something else?

If either b) or c), what will it take to get the changes rolled back into
ant proper?

----
Barry Kaplan
bkaplan@abwg.com



--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message