You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Stefan Geelen <st...@hotmail.com> on 2002/03/05 11:36:35 UTC

JDK 1.4. : javax.xml.transform.TransformerException: java.io.IOException:

Hi,

I found out that the error is produced when Xalan is used with JDK1.4.
With JDK 1.3.1. the problem disappeared.

Sefan
>From: "Stefan Geelen" <st...@xentri.com>
>To: <xa...@xml.apache.org>
>Subject: javax.xml.transform.TransformerException: java.io.IOException:
>Date: Thu, 28 Feb 2002 19:38:17 +0100
>
>Hi,
>
>I have a XML file that calls an XSL file for transforming to a new XML 
>file:
>
>In XML file:
><?xml version="1.0" encoding="UTF-16" standalone="no" ?>
>
><?xml-stylesheet href="invoices.xsl" type="text/xsl"?>
>
>In XSL file:
>
><?xml version="1.0" ?>
>
><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
>version="1.0">
>
><xsl:output method="xml" indent="yes" doctype-system="test.dtd" 
>encoding="UTF-16"/>
>
>Transforming on a Windows2000 or NT PC give no problems.
>
>Converting on a Windows ME PC gives following error:
>
>javax.xml.transform.TransformerException: java.io.IOException: The system 
>cannot find the path specified.
>
>Code extract where error occurs:
>try { // Check if xml has link to stylesheet
>
>System.err.println("Looking for XSL file...");
>
>Source stylesheet = tFactory.getAssociatedStylesheet(new 
>StreamSource(xmlfile),media, title, charset);
>
>transformer = tFactory.newTransformer(stylesheet);
>
>System.err.println("XSL Stylesheet found...");
>
>try {
>
>transformer.transform(source, new 
>javax.xml.transform.sax.SAXResult(handler));
>
>} catch (Exception e) { //Error in transforming
>
>System.err.println("Error in transformer.transform method...");
>
>System.err.println("source: "+source.toString());
>
>}
>
>
>} catch (Exception e) { //No stylesheet in xml
>
>System.err.println("No XSL stylesheet found...");
>
>transformer = tFactory.newTransformer();
>
>transformer.transform(source, new 
>javax.xml.transform.sax.SAXResult(handler));
>
>}
>
>
>Question is which path is being looked for ?
>The .xml and .xsl files are in the same directory.
>
>Regards,
>
>Stefan
>
>
>




_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com