You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Norman Walsh <nd...@nwalsh.com> on 2001/05/14 15:16:55 UTC

Can't write to -OUT file in Xalan?

Hi,

Running XalanJ from the CVS of yesterday afternoon, if I attempt to
use the -OUT option, I always get the error:

  XSLT Error (javax.xml.transform.TransformerException): share/projects/sourceforge/docbook/testdocs/out.html (No such file or directory)

I suspect that the code in Process.java

        if (null != outFileName)
        {
          strResult = new StreamResult(new File(outFileName));
        }
        else
        {
          strResult = new StreamResult(System.out);
        }

isn't doing enough work to open the new File for output. Or am I mistaken?

                                        Be seeing you,
                                          norm

-- 
Norman.Walsh@Sun.COM   | Birds are taken with pipes that imitate their
XML Standards Engineer | own voices, and men with those sayings that
Technology Dev. Group  | are most agreeable to their own
Sun Microsystems, Inc. | opinions.--Samuel Butler

Re: Can't write to -OUT file in Xalan?

Posted by Norman Walsh <nd...@nwalsh.com>.
/ Tom Amiro <To...@Sun.COM> was heard to say:
| I reported the same problem on Friday when trying to build the docs target.
| Thought is might have something to do with the Solaris platform. You're
| not running on Solaris though, are you?

No, I'm on Linux.

                                        Be seeing you,
                                          norm

-- 
Norman.Walsh@Sun.COM   | The last act is bloody, however fine the rest
XML Standards Engineer | of the play. They throw earth over your head
Technology Dev. Group  | and it is finished for ever.--Pascal
Sun Microsystems, Inc. | 

Re: Can't write to -OUT file in Xalan?

Posted by Tom Amiro <To...@Sun.COM>.
I reported the same problem on Friday when trying to build the docs target.
Thought is might have something to do with the Solaris platform. You're
not running on Solaris though, are you?

Tom

Norman Walsh wrote:

> Hi,
>
> Running XalanJ from the CVS of yesterday afternoon, if I attempt to
> use the -OUT option, I always get the error:
>
>   XSLT Error (javax.xml.transform.TransformerException): share/projects/sourceforge/docbook/testdocs/out.html (No such file or directory)
>
> I suspect that the code in Process.java
>
>         if (null != outFileName)
>         {
>           strResult = new StreamResult(new File(outFileName));
>         }
>         else
>         {
>           strResult = new StreamResult(System.out);
>         }
>
> isn't doing enough work to open the new File for output. Or am I mistaken?
>
>                                         Be seeing you,
>                                           norm
>
> --
> Norman.Walsh@Sun.COM   | Birds are taken with pipes that imitate their
> XML Standards Engineer | own voices, and men with those sayings that
> Technology Dev. Group  | are most agreeable to their own
> Sun Microsystems, Inc. | opinions.--Samuel Butler


Re: Can't write to -OUT file in Xalan?

Posted by Norman Walsh <nd...@nwalsh.com>.
/ Gary L Peskin <ga...@firstech.com> was heard to say:
| Norman Walsh wrote:
| > I simplified things to a trivial test case:
| > 
| > $ java -cp /projects/apache/xml-xerces/java/build/classes:/projects/apache/xml-xalan/java/build/classes org.apache.xalan.xslt.Process -IN test.xml -XSL test.xsl -OUT out.html
| > 
| > XSLT Error (javax.xml.transform.TransformerException): home/ndw/out.html (No such file or directory)
| 
| Thanks for the info, Norm.  What was your working directory when you
| executed the java command?

/home/ndw

                                        Be seeing you,
                                          norm

-- 
Norman.Walsh@Sun.COM   | The art of living is more like wrestling than
XML Standards Engineer | dancing.--Marcus Aurelius
Technology Dev. Group  | 
Sun Microsystems, Inc. | 

Re: Can't write to -OUT file in Xalan?

Posted by Gary L Peskin <ga...@firstech.com>.
Norman Walsh wrote:
> 
> / Gary L Peskin <ga...@firstech.com> was heard to say:
> | Norm --
> |
> | This is a result of a typo on my part.  Thanks for finding and reporting
> | it!  Can you supply your complete command line so that I can see what
> | value you're using for the -out argument since I'm unable to reproduce
> | this problem on my WinNT machine using my command lines.  I'd like to
> | verify that it's broken before but working after my fix.
> 
> I simplified things to a trivial test case:
> 
> $ java -cp /projects/apache/xml-xerces/java/build/classes:/projects/apache/xml-xalan/java/build/classes org.apache.xalan.xslt.Process -IN test.xml -XSL test.xsl -OUT out.html
> 
> XSLT Error (javax.xml.transform.TransformerException): home/ndw/out.html (No such file or directory)

Thanks for the info, Norm.  What was your working directory when you
executed the java command?

Gary

Re: Can't write to -OUT file in Xalan?

Posted by Norman Walsh <nd...@nwalsh.com>.
/ Gary L Peskin <ga...@firstech.com> was heard to say:
| Norm --
| 
| This is a result of a typo on my part.  Thanks for finding and reporting
| it!  Can you supply your complete command line so that I can see what
| value you're using for the -out argument since I'm unable to reproduce
| this problem on my WinNT machine using my command lines.  I'd like to
| verify that it's broken before but working after my fix.

I simplified things to a trivial test case:

$ java -cp /projects/apache/xml-xerces/java/build/classes:/projects/apache/xml-xalan/java/build/classes org.apache.xalan.xslt.Process -IN test.xml -XSL test.xsl -OUT out.html

XSLT Error (javax.xml.transform.TransformerException): home/ndw/out.html (No such file or directory)

| Also, can you include the -edump parameter on your command line and send
| the stack trace?

javax.xml.transform.TransformerException: home/ndw/out.html (No such file or directory)
        at org.apache.xalan.transformer.TransformerImpl.createResultContentHandler(TransformerImpl.java:1139)
        at org.apache.xalan.transformer.TransformerImpl.createResultContentHandler(TransformerImpl.java:1048)
        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1163)
        at org.apache.xalan.xslt.Process.main(Process.java:701)
---------
java.io.FileNotFoundException: home/ndw/out.html (No such file or directory)
        at java.io.FileOutputStream.open(Native Method)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:98)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:58)
        at org.apache.xalan.transformer.TransformerImpl.createResultContentHandler(TransformerImpl.java:1124)
        at org.apache.xalan.transformer.TransformerImpl.createResultContentHandler(TransformerImpl.java:1048)
        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1163)
        at org.apache.xalan.xslt.Process.main(Process.java:701)

                                        Be seeing you,
                                          norm

-- 
Norman.Walsh@Sun.COM   | Clearness is so eminently one of the
XML Standards Engineer | characteristics of truth that often it even
Technology Dev. Group  | passes for truth itself.--Joubert
Sun Microsystems, Inc. | 

Re: Can't write to -OUT file in Xalan?

Posted by Gary L Peskin <ga...@firstech.com>.
Norm --

This is a result of a typo on my part.  Thanks for finding and reporting
it!  Can you supply your complete command line so that I can see what
value you're using for the -out argument since I'm unable to reproduce
this problem on my WinNT machine using my command lines.  I'd like to
verify that it's broken before but working after my fix.

Also, can you include the -edump parameter on your command line and send
the stack trace?

Thanks,
Gary

Norman Walsh wrote:
> 
> Hi,
> 
> Running XalanJ from the CVS of yesterday afternoon, if I attempt to
> use the -OUT option, I always get the error:
> 
>   XSLT Error (javax.xml.transform.TransformerException): share/projects/sourceforge/docbook/testdocs/out.html (No such file or directory)
> 
> I suspect that the code in Process.java
> 
>         if (null != outFileName)
>         {
>           strResult = new StreamResult(new File(outFileName));
>         }
>         else
>         {
>           strResult = new StreamResult(System.out);
>         }
> 
> isn't doing enough work to open the new File for output. Or am I mistaken?
> 
>                                         Be seeing you,
>                                           norm
> 
> --
> Norman.Walsh@Sun.COM   | Birds are taken with pipes that imitate their
> XML Standards Engineer | own voices, and men with those sayings that
> Technology Dev. Group  | are most agreeable to their own
> Sun Microsystems, Inc. | opinions.--Samuel Butler