http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2731 *** shadow/2731 Sun Jul 22 07:03:53 2001 --- shadow/2731.tmp.2227 Mon Jul 23 04:51:32 2001 *************** *** 60,63 **** The test code produces the correct output file, Saxon handles the code correctly, so I assume this is a Xalan bug. It works on Windows, but not on Linux (i386, Sun JDK 1.3.0). I can try other JDKs, Solaris and Linux/Sparc if ! this should help. --- 60,100 ---- The test code produces the correct output file, Saxon handles the code correctly, so I assume this is a Xalan bug. It works on Windows, but not on Linux (i386, Sun JDK 1.3.0). I can try other JDKs, Solaris and Linux/Sparc if ! this should help. ! ! ------- Additional Comments From [EMAIL PROTECTED] 2001-07-23 04:51 ------- ! The systemId of the StreamResult should be set correctly as you create it from a ! File object, it uses the setSystemId implementation below. ! ! public void setSystemId(File f) { ! String fpath=f.getAbsolutePath(); ! if( fpath.startsWith("/")) ! this.systemId= "file://" + fpath; ! else ! this.systemId = "file:///" + fpath; ! } ! ! This will always give an absolute path begining with 'file:///' ! ! You could also try creating a FileOutputStream of your own and passing that to ! the StreamResult constructor. This should work around the problem. ! ! The relevant code in TransformerImpl seems to be the following, which strips ! off the entire file:/// and then tries to open the file. ! else if (null != sresult.getSystemId()) ! { ! String fileURL = sresult.getSystemId(); ! ! if (fileURL.startsWith("file:///")) ! { ! fileURL = fileURL.substring(8); ! } ! ! m_outputStream = new java.io.FileOutputStream(fileURL); ! ! serializer.setOutputStream(m_outputStream); ! } ! ! It might work better if it only stripped off file://, i.e. if it was changed ! to read : ! fileURL = fileURL.substring(7);
