> on at the moment and one can create new calls to programs to > open a file (tools, folder options, file types tab). Suppose > you simply define an option to "view as PDF" or something? > You can specify a call to fop (with a call to the style sheet > that will filter out what exactly to do with the style sheet > called in the XML document) there and see what happens.
That is basically what I am doing at the moment, but there are two problems. Firstly the script to view as PDF needs to know the exact stylesheet to use. When opening XML in IE, IE reads the stylesheet to use from the XML file, so the whole thing is simplified. If FOP could read the stylesheet to use in the same way, then the whole thing would be simple. At the moment, to read my XML defined in my CCR DTD, I use ccr_fo.xsl, and I have to run a specific script to specify that stylesheet. To run that specific script I need to use a different file extension. Hence for each DTD you need a different file extension, which basically is the opposite of the purposes of XML being a meta data language. The second problem is that when using a different extension with an "View as PDF", I cannot find a way to have FOP pass the data directly to PDF. This means that my script consists of two steps - Use FOP to compile to PDF, and then run Acrobat Reader to view the interim file. At the end of the process the interim file is still lurking around. Plus running a script opens a DOS prompt window that looks unnecessary. Since IE can use Acrobat Reader as a plug-in, it would be nice if we could display in IE as a PDF file without having any other windows mysteriously (to a user) appearing. I like your idea to have one stylesheet that converts to either PDF or HTML. Could you give me some simple code that detects a parameter and either does one thing or another. One day IE will no doubt display XSL FO, and it won't be needed :) Lastly, I see that Acrobat Reader can run plug-ins. It would be nice to open the XML file directly to Acrobat Reader, which detects that it is an XML file (AR already has some XML functionality relating to forms, but I have no idea what, how, when, or where), and pre-processes it using FOP and the relevant style sheet. Anyone have any idea how to write Acrobat Reader plug-ins?
