I believe you can
give a relative path.
Use
System.getProperty("user.dir"); to find where you are running from and then
specify a relative path from that location.
-----Original Message-----
From: Bob Lee [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 29, 2004 11:45 AM
To: [EMAIL PROTECTED]
Subject: 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
The information contained in this message is intended only for the recipient, and may be a confidential attorney-client communication or may otherwise be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, please be aware that any dissemination or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify us by replying to the message and deleting it from your computer.
Thank you,
Standard & Poor's
