Harry Liljeström wrote:
Hi,

does the XalanTransformer::transform(...) method support somehow URI as output file?

Here snippet from my test code:

XalanTransformer::initialize( memoryManager );
XalanTransformer theXalanTransformer( memoryManager );
theXalanTransformer.transform("file:///C:/Program Files/MySoft/in/input.xml", "file:///C:/Program Files/MySoft/trans/transform.xsl", "file:///C:/Program Files/MySoft/out/output.xml");

If I have URI as third parameter(file:///C:/Program Files/MySoft/out/output.xml) I get following error:

XalanFileOutputStreamOpenException: Error opening file:
file:///C:/Program Files/MySoft/etc/output.xml.The system error
code (errno) is 123. (,line -1, column -1)

I don't think XSLTResultTarget supports file URLs, only file names. BTW, URLs with spaces in the are not strictly legal.


The application which executes the transform is launched in
file:///C:/Program Files/MySoft/bin folder

If I change the third parameter in transform method to "output.xml", the file is written without errors to /bin folder. But I need it appearing in /out folder.

Could someone provide me some help with this?

Well, C:/Program Files/MySoft/etc/output.xml should work, as should any other (legal) absolute or relative path. Have you tried that?

Dave

Reply via email to