You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Bob Lee <bo...@yahoo.com> on 2004/04/29 17:44:58 UTC

How to get the XSL file using relative path?

hi,

I have a xsl file. I need to use Transformer to process this xsl source into a Transformer object. But it looks like I have to specify the full path for this XSL file. This is what I want to avoid because we do not want to change the file path manually once we deploy it to our production. Here is the codes. I appreciate it if anyone can give me some suggestions.

//ViewStock is my project name

File MyXsl = new File("C:/workspace/ViewStock/Web Content/html/StockTemplate.xsl"); 

//Setup XSLT

TransformerFactory factory = TransformerFactory.newInstance();

Transformer transformer = factory.newTransformer(new StreamSource(MyXsl));

 

thanks in advance,

Bob


		
---------------------------------
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs