Hi Paul,
What does 'String stylesheet' look like??? In the current code,
newTransformer takes a Source stylesheet and does two things (currently):
(1) casts the Source to a StreamSource and then attempts to get an
java.io.InputStream out of it, (2) tries to get a SystemId from Source
and it then tries to open a java.io.File from it. My guess is that
if you are passing in a URL, then I need to handle that directly.
-Todd
>>System.setProperty("javax.xml.transform.TransformerFactory","org.apache.xala
>>n.xsltc.runtime.TransformerFactoryImpl");
>>TemplateLoader theLoader = new TemplateLoader();
>>String stylesheet =
>>theLoader.getFileLocation(baseRoot,thePOS,theLocale,templateName);
What does String stylesheet look like???
>>templatefilepath = theLoader.getTemplateFilePath();
>>Templates template = null;
>>String output = new String();
>> try
>> {
>> String xslInURI = stylesheet;
>> String xmlInURI = templatefilepath;
>> TransformerFactory tFactory =
TransformerFactory.newInstance();
>> Transformer transformer = tFactory.newTransformer(new
>>StreamSource(xslInURI)); //THROWS EXCEPTION HERE
>> transformer.transform(new StreamSource(xmlInURI),new
>>StreamResult(output));
=======================================================================
G. Todd Miller Sun Microsystems Computer Company
Software Systems Engineer 2 Network Drive, MS UBUR02-201
GE&IS XML Tech Center Burlington, MA 01803-0903
781 442-0176
781 442-1437 (fax)
[EMAIL PROTECTED]
Re: Problems with TransformerFactory.newTransformer()
G. Todd Miller - XML Tech Ctr - Development Tue, 19 Jun 2001 06:25:51 -0700
- RE: Problems with TransformerF... G. Todd Miller - XML Tech Ctr - Development
- RE: Problems with Transfo... Paul O'Neill
