-----Original Message-----
From: Williamson, James [mailto:[EMAIL PROTECTED]]
Sent: 05 July 2001 17:15
To: '[EMAIL PROTECTED]'
Subject: RE: XSLTInputHandler not doing its job??Wolf,
That's not valid XML, when it says view source for full doctype it doesn't expect you to take that literally.
DOCTYPE's generally take these form:<!DOCTYPE docroot PUBLIC "remote_dtd" >
or
<!DOCTYPE docroot SYSTEM "local_dtd" >
or (embedded)
<!DOCTYPE docroot [
your embedded DTD
]>I'm no FOP expert but I'm sure I remember being able to configure FOP to tolerate XML (i.e. HTML) perhaps you could have a look at the source code for the FOP app.
Regards,
James
-----Original Message-----
From: Wolf Gustavo (SGC-EXT) [mailto:[EMAIL PROTECTED]]
Sent: 05 July 2001 16:50
To: Fop (E-mail)
Subject: XSLTInputHandler not doing its job??
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>>
**********************************************************************
This e-mail (including any documents which may accompany it) contains
information which is confidential and may also be privileged.
It is for the exclusive use of the intended recipient(s).
If you are not the intended recipient(s) please note that any form of
distribution, copying or use of this e-mail or the information in it
or attached to it is strictly prohibited and may be unlawful.
If you have received this e-mail in error please notify us immediately
by e-mail to [EMAIL PROTECTED] or telephone +44 (0)207 940 1200 and
delete the e-mail.
Please advise immediately if you or your employer do not consent to
Internet E-Mail for messages of this type.
Information or opinions in this message that do not relate to the
business of Windsor plc and/or subsidiary and/or associated companies
shall be treated as neither given or endorsed by it.
**********************************************************************
**********************************************************************
This e-mail (including any documents which may accompany it) contains
information which is confidential and may also be privileged.
It is for the exclusive use of the intended recipient(s).
If you are not the intended recipient(s) please note that any form of
distribution, copying or use of this e-mail or the information in it
or attached to it is strictly prohibited and may be unlawful.
If you have received this e-mail in error please notify us immediately
by e-mail to [EMAIL PROTECTED] or telephone +44 (0)207 940 1200 and
delete the e-mail.
Please advise immediately if you or your employer do not consent to
Internet E-Mail for messages of this type.
Information or opinions in this message that do not relate to the
business of Windsor plc and/or subsidiary and/or associated companies
shall be treated as neither given or endorsed by it.
**********************************************************************