XML to HTML/PDF On-the-Fly

wxdqz

New Member
I'm a complete newbie to XML, so please bear with me. I've created a basic XML doc, and two stylesheets to convert the data.

The first XSL stylesheet converts the XML data to HTML format

The second XSL-FO stylesheet converts the XML data to PDF using the Apache FOP processor.

This setup works pretty well (except for some font issues), but I'm wanting to have this processor create those documents on-the-fly. This setup would allow for me to only store a base XML doc that contains links to different XSL stylesheets that would convert the data. From an article from the Center for Technology in Government titled "XML: A New Web Architecture", this is how it says that I can accomplish this (with the help of Apache's Cocoon):
<?xml version="1.0"?>
<!--Specify the media type and the corresponding stylesheet
<?xml-stylesheet href=http://www.webdeveloper.com/forum/archive/index.php/"page_ss.xsl" type="text/xsl" media="netscape"?>
<?xml-stylesheet href="page_ss_ie.xsl" type="text/xsl" media="explorer"?>
<?xml-stylesheet href="page_ss.xsl" type="text/xsl" media="mozilla5"?>
<?xml-stylesheet href="page_ss_lynx.xsl" type="text/xsl" media="lynx"?>
<?xml-stylesheet href="page_ss.xsl" type="text/xsl"?>

The article states that they use Apache's Cocoon to do this, but I've already started working with XMLSpy 5.0 and Apache's FOP Processor. I've tried to install Cocoon to check it out, but have found their whole process hard to understand. So my questions are:
1) Can I accomplish an on-the-fly processor with XMLSpy 5.0 and Apache's FOP processor, or can I only use Apache's Cocoon to do this?
2) If this can be accomplished with XMLSpy and FOP, what steps do I need to follow?
3) If this can only be accomplished with Cocoon, could you point me in the right direction for some good Cocoon documentation?

Thanks for any & all help.
 
Back
Top