Hi,
      as I said a few hours ago, I have the following code:

        InputHandler inputHandler = new
XSLTInputHandler(xmlInputSource,xslInputSource);
        InputSource inputSource = inputHandler.getInputSource();
        XMLReader  parser = (XMLReader)
Class.forName(this.parserClass).newInstance();
 
parser.setFeature("http://xml.org/sax/features/namespace-prefixes",true);
/**
* Creates the driver telling it to write the output to a file.
*/
        Driver driver = new Driver();
        driver.setRenderer("org.apache.fop.render.pdf.PDFRenderer");
//  ERROR IN THE FOLLOWING LINE
        driver.buildFOTree(parser, inputSource);
        File test = new File("test.pdf");
        driver.setOutputStream(new java.io.FileOutputStream(test));
        driver.format();
        driver.render();

In the second line, InputSource inputSource is suppossed to be the .fo file
after the processing of xmlInputSource by xslInputSource.

I am using as xmlInputSource and xslInputSource two files that I took from
the chap 15 of the XMLbible (attached).

Now, when the program tries to execute "driver.buildFOTree(parser,
inputSource);", I get the following msg and Exception:

"building formatting object tree
 WARNING: Unknown formatting object ^PERIODIC_TABLE
 FOPException: org.xml.sax.SAXException (msg: null)"

It seems to me that XSLTInputHandler is not doing its job properly, because
of the WARNING.

Again, if I run a line command with 
Fop -xml xmlInputSource -xsl xslInputSource -pdf test.pdf 
everything is OK, which tells me that there shouldn't be a problem with the
input files.

Does anyone knows how to cure this? 

Thanks a lot,
                                Gustavo





 <<prueba.xml>>  <<prueba.xsl>> 


prueba.xml

prueba.xsl

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to