I use saxon to create 5 html files from 1 xml file. Whenever I run code windows, it runs smoothly and creates all the necessary files. However, when I run the code on unix, this leads to this error:
Failed to create output file file:/output1.html: Permission denied
Searching stackoverflow, I found out that it was trying to write to the root directory, which made me try setBaseOutputURI ().
I am trying to make saxon output html files to / foo / biz / html _out, so I wrote this code:
String filePathUri = "file://foo/biz/html_out/"; xsltTransformer.setBaseOutputURI(filePathUri);
The error is now reading
net.sf.saxon.s9api.SaxonApiException: Cannot write to URI file:
My questions:
I came to the correct conclusion that I need to use setBaseOutputURI?
Am I spelling URI incorrectly?
Is there anything else I should try, given that the code works fine on Windows?
source share