Subject:Document Path reference after new install Author:Mike Carroll Date:02 Sep 2009 01:05 AM
I have just moved to version 10 of SS Pro after using 8 for a couple of years. My primary need is to load an xml file and xsl style sheet and create a pdf document from them using a custom fop (set in the scenario).
Now this has been working for over 18 months.
However when I load my style sheet and try and run it to create the document, it comes up with a severe error;
"SEVERE: Exception
java.io.FileNotFoundException: Error: xsl file C:\Program Files\Stylus Studio 2009 Release 2 XML Professional Suite\bin\file:\c:\Strategis\Printing\Lubricants%20Installation\Templates\lub_invoice.xsl not found
at org.apache.fop.cli.CommandLineOptions.checkSettings(CommandLineOptions.java:733)
at org.apache.fop.cli.CommandLineOptions.parse(CommandLineOptions.java:145)
at org.apache.fop.cli.Main.startFOP(Main.java:154)
at org.apache.fop.cli.Main.main(Main.java:197)
...done"
Now it has obviously got confused with the path to the document, even though the document is already loaded and on screen. I have checked and unchecked the "store paths relative to the xslt path" in the scenario, but that doesn't help.
Subject:Document Path reference after new install Author:(Deleted User) Date:02 Sep 2009 01:08 PM
Hi Mike,
Stylus Studio invokes the FOP processor on an XML file using the local path name (i.e. without the file:// prefix). How are you running the transformation? Are you by chance using a custom post processing step?
These settings are exactly the same as I had on SSL 2008 pro. Unfortunately the license stopped activating on this and I had bought the upgrade, so moved to version 10.
The fop path is correct and it operates correctly.
Subject:Document Path reference after new install Author:(Deleted User) Date:03 Sep 2009 07:30 AM
Hi Mike,
Stylus Studio always specifies the XSL parameter (indicated in the custom XSLT processor as the %2 macro) as a full URL, instead of using a local file name (as it does for the %1 macro argument). We will fix this mismatch in a future update of Stylus, but in the meanwhile you can workaround the problem by creating a new batch file containing
set ARG=%2
set LOCALPART=%ARG:~8%
set XSL=%LOCALPART:/=\%
call fop.bat -xml %1 -xsl "%XSL%" -foout %3
Note that this will not replace the %20 strings into spaces, so be sure to place the XSL being edited in a folder that doesn't contain spaces.