xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "chandrakant_binwani" <chandrakant_binw...@infosys.com>
Subject RE: Problem with PDF generation
Date Thu, 06 Jun 2002 14:19:10 GMT

Yes... the xsl has following lines :

<xsl:stylesheet
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
     xmlns:fo="http://www.w3.org/1999/XSL/Format">


-----Original Message-----
From: Michiel Verhoef [mailto:michiel.verhoef@cmg.nl]
Sent: Thursday, June 06, 2002 7:38 PM
To: 'fop-user@xml.apache.org'
Subject: RE: Problem with PDF generation


I'm no java guru but it looks like your XSLT stylesheet is not correct.
Does it contain the following line?

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">


Michiel


$ -----Original Message-----
$ From: chandrakant_binwani [mailto:chandrakant_binwani@infosys.com]
$ Sent: donderdag 6 juni 2002 16:07
$ To: fop-user@xml.apache.org
$ Cc: Katiyar, Bhawana
$ Subject: RE: Problem with PDF generation
$ 
$ 
$ 
$ 
$ Hi,
$ I'm getting following exception while generating a pdf using FOP.
$ 
$ **************************************************************
$ **************************
$ file:///D:/tempReports/testReport.xml; Line 2; Column 24; 
$ org.apache.fop.apps.FOPException
$         at 
$ org.apache.fop.apps.XSLTInputHandler.getParser(XSLTInputHandle
$ r.java:109)
$         at com.cpb.util.PDFWriter.renderXML(PDFWriter.java:89)
$         at com.cpb.util.PDFWriter.Print(PDFWriter.java:70)
$         at com.cpb.util.PDFWriter.main(PDFWriter.java:43)
$ 
$ ---------
$ 
$ java.lang.reflect.InvocationTargetException: 
$ org.apache.fop.apps.FOPException: stylesheet requires a
$ ttribute: version
$         at 
$ org.apache.fop.apps.TraxInputHandler.getXMLFilter(TraxInputHan
$ dler.java:103)
$         at java.lang.reflect.Method.invoke(Native Method)
$         at 
$ org.apache.fop.apps.XSLTInputHandler.getParser(XSLTInputHandle
$ r.java:102)
$         at com.cpb.util.PDFWriter.renderXML(PDFWriter.java:89)
$         at com.cpb.util.PDFWriter.Print(PDFWriter.java:70)
$         at com.cpb.util.PDFWriter.main(PDFWriter.java:43)
$ 
$ ---------
$ 
$ 
$ ---------
$ 
$ org.apache.fop.apps.FOPException: stylesheet requires 
$ attribute: version
$         at 
$ org.apache.fop.apps.TraxInputHandler.getXMLFilter(TraxInputHan
$ dler.java:103)
$         at java.lang.reflect.Method.invoke(Native Method)
$         at 
$ org.apache.fop.apps.XSLTInputHandler.getParser(XSLTInputHandle
$ r.java:102)
$         at com.cpb.util.PDFWriter.renderXML(PDFWriter.java:89)
$         at com.cpb.util.PDFWriter.Print(PDFWriter.java:70)
$         at com.cpb.util.PDFWriter.main(PDFWriter.java:43)
$ 
$ ---------
$ 
$ javax.xml.transform.TransformerConfigurationException: 
$ stylesheet requires attribute: version
$         at 
$ org.apache.xalan.processor.TransformerFactoryImpl.newTemplates
$ (TransformerFactoryImpl.jav
$ a:815)
$         at 
$ org.apache.xalan.processor.TransformerFactoryImpl.newXMLFilter
$ (TransformerFactoryImpl.jav
$ a:486)
$         at 
$ org.apache.fop.apps.TraxInputHandler.getXMLFilter(TraxInputHan
$ dler.java:84)
$         at java.lang.reflect.Method.invoke(Native Method)
$         at 
$ org.apache.fop.apps.XSLTInputHandler.getParser(XSLTInputHandle
$ r.java:102)
$         at com.cpb.util.PDFWriter.renderXML(PDFWriter.java:89)
$         at com.cpb.util.PDFWriter.Print(PDFWriter.java:70)
$         at com.cpb.util.PDFWriter.main(PDFWriter.java:43)
$ ---------
$ javax.xml.transform.TransformerException: stylesheet requires 
$ attribute: version
$         at 
$ org.apache.xalan.processor.TransformerFactoryImpl.newTemplates
$ (TransformerFactoryImpl.jav
$ a:813)
$         at 
$ org.apache.xalan.processor.TransformerFactoryImpl.newXMLFilter
$ (TransformerFactoryImpl.jav
$ a:486)
$         at 
$ org.apache.fop.apps.TraxInputHandler.getXMLFilter(TraxInputHan
$ dler.java:84)
$         at java.lang.reflect.Method.invoke(Native Method)
$         at 
$ org.apache.fop.apps.XSLTInputHandler.getParser(XSLTInputHandle
$ r.java:102)
$         at com.cpb.util.PDFWriter.renderXML(PDFWriter.java:89)
$         at com.cpb.util.PDFWriter.Print(PDFWriter.java:70)
$         at com.cpb.util.PDFWriter.main(PDFWriter.java:43)
$ ---------
$ javax.xml.transform.TransformerException: stylesheet requires 
$ attribute: version
$         at 
$ org.apache.xalan.processor.StylesheetHandler.error(StylesheetH
$ andler.java:866)
$         at 
$ org.apache.xalan.processor.XSLTElementProcessor.setPropertiesF
$ romAttributes(XSLTElementPr
$ ocessor.java:389)
$         at 
$ org.apache.xalan.processor.XSLTElementProcessor.setPropertiesF
$ romAttributes(XSLTElementPr
$ ocessor.java:300)
$         at 
$ org.apache.xalan.processor.ProcessorLRE.startElement(Processor
$ LRE.java:184)
$         at 
$ org.apache.xalan.processor.StylesheetHandler.startElement(Styl
$ esheetHandler.java:632)
$         at 
$ org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1376)
$         at 
$ org.apache.xerces.validators.common.XMLValidator.callStartElem
$ ent(XMLValidator.java:1170)
$ 
$         at 
$ org.apache.xerces.framework.XMLDocumentScanner$ContentDispatch
$ er.dispatch(XMLDocumentScan
$ ner.java:994)
$         at 
$ org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDo
$ cumentScanner.java:381)
$         at 
$ org.apache.xerces.framework.XMLParser.parse(XMLParser.java:952)
$         at 
$ org.apache.xalan.processor.TransformerFactoryImpl.newTemplates
$ (TransformerFactoryImpl.jav
$ a:795)
$         at 
$ org.apache.xalan.processor.TransformerFactoryImpl.newXMLFilter
$ (TransformerFactoryImpl.jav
$ a:486)
$         at 
$ org.apache.fop.apps.TraxInputHandler.getXMLFilter(TraxInputHan
$ dler.java:84)
$         at java.lang.reflect.Method.invoke(Native Method)
$         at 
$ org.apache.fop.apps.XSLTInputHandler.getParser(XSLTInputHandle
$ r.java:102)
$         at com.cpb.util.PDFWriter.renderXML(PDFWriter.java:89)
$         at com.cpb.util.PDFWriter.Print(PDFWriter.java:70)
$         at com.cpb.util.PDFWriter.main(PDFWriter.java:43)
$ ---------
$ ; SystemID: file:///D:/tempReports/testReport.xml; Line#: 2; 
$ Column#: 24
$ ; SystemID: file:///D:/tempReports/testReport.xml; Line#: 2; 
$ Column#: 24
$ javax.xml.transform.TransformerException: stylesheet requires 
$ attribute: version
$         at 
$ org.apache.xalan.processor.StylesheetHandler.error(StylesheetH
$ andler.java:852)
$         at 
$ org.apache.xalan.processor.XSLTElementProcessor.setPropertiesF
$ romAttributes(XSLTElementPr
$ ocessor.java:389)
$         at 
$ org.apache.xalan.processor.XSLTElementProcessor.setPropertiesF
$ romAttributes(XSLTElementPr
$ ocessor.java:300)
$         at 
$ org.apache.xalan.processor.ProcessorLRE.startElement(Processor
$ LRE.java:184)
$         at 
$ org.apache.xalan.processor.StylesheetHandler.startElement(Styl
$ esheetHandler.java:632)
$         at 
$ org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1376)
$         at 
$ org.apache.xerces.validators.common.XMLValidator.callStartElem
$ ent(XMLValidator.java:1170)
$ 
$         at 
$ org.apache.xerces.framework.XMLDocumentScanner$ContentDispatch
$ er.dispatch(XMLDocumentScan
$ ner.java:994)
$         at 
$ org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDo
$ cumentScanner.java:381)
$         at 
$ org.apache.xerces.framework.XMLParser.parse(XMLParser.java:952)
$         at 
$ org.apache.xalan.processor.TransformerFactoryImpl.newTemplates
$ (TransformerFactoryImpl.jav
$ a:795)
$         at 
$ org.apache.xalan.processor.TransformerFactoryImpl.newXMLFilter
$ (TransformerFactoryImpl.jav
$ a:486)
$         at 
$ org.apache.fop.apps.TraxInputHandler.getXMLFilter(TraxInputHan
$ dler.java:84)
$         at java.lang.reflect.Method.invoke(Native Method)
$         at 
$ org.apache.fop.apps.XSLTInputHandler.getParser(XSLTInputHandle
$ r.java:102)
$         at com.cpb.util.PDFWriter.renderXML(PDFWriter.java:89)
$         at com.cpb.util.PDFWriter.Print(PDFWriter.java:70)
$         at com.cpb.util.PDFWriter.main(PDFWriter.java:43)
$ ---------
$ javax.xml.transform.TransformerException: stylesheet requires 
$ attribute: version
$         at 
$ org.apache.xalan.processor.StylesheetHandler.error(StylesheetH
$ andler.java:866)
$         at 
$ org.apache.xalan.processor.XSLTElementProcessor.setPropertiesF
$ romAttributes(XSLTElementPr
$ ocessor.java:389)
$         at 
$ org.apache.xalan.processor.XSLTElementProcessor.setPropertiesF
$ romAttributes(XSLTElementPr
$ ocessor.java:300)
$         at 
$ org.apache.xalan.processor.ProcessorLRE.startElement(Processor
$ LRE.java:184)
$         at 
$ org.apache.xalan.processor.StylesheetHandler.startElement(Styl
$ esheetHandler.java:632)
$         at 
$ org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1376)
$         at 
$ org.apache.xerces.validators.common.XMLValidator.callStartElem
$ ent(XMLValidator.java:1170)
$ 
$         at 
$ org.apache.xerces.framework.XMLDocumentScanner$ContentDispatch
$ er.dispatch(XMLDocumentScan
$ ner.java:994)
$         at 
$ org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDo
$ cumentScanner.java:381)
$         at 
$ org.apache.xerces.framework.XMLParser.parse(XMLParser.java:952)
$         at 
$ org.apache.xalan.processor.TransformerFactoryImpl.newTemplates
$ (TransformerFactoryImpl.jav
$ a:795)
$         at 
$ org.apache.xalan.processor.TransformerFactoryImpl.newXMLFilter
$ (TransformerFactoryImpl.jav
$ a:486)
$         at 
$ org.apache.fop.apps.TraxInputHandler.getXMLFilter(TraxInputHan
$ dler.java:84)
$         at java.lang.reflect.Method.invoke(Native Method)
$         at 
$ org.apache.fop.apps.XSLTInputHandler.getParser(XSLTInputHandle
$ r.java:102)
$         at com.cpb.util.PDFWriter.renderXML(PDFWriter.java:89)
$         at com.cpb.util.PDFWriter.Print(PDFWriter.java:70)
$         at com.cpb.util.PDFWriter.main(PDFWriter.java:43)
$ ---------
$ ; SystemID: file:///D:/tempReports/testReport.xml; Line#: 2; 
$ Column#: 24
$ ; SystemID: file:///D:/tempReports/testReport.xml; Line#: 2; 
$ Column#: 24
$ javax.xml.transform.TransformerException: stylesheet requires 
$ attribute: version
$         at 
$ org.apache.xalan.processor.StylesheetHandler.error(StylesheetH
$ andler.java:852)
$         at 
$ org.apache.xalan.processor.XSLTElementProcessor.setPropertiesF
$ romAttributes(XSLTElementPr
$ ocessor.java:389)
$         at 
$ org.apache.xalan.processor.XSLTElementProcessor.setPropertiesF
$ romAttributes(XSLTElementPr
$ ocessor.java:300)
$         at 
$ org.apache.xalan.processor.ProcessorLRE.startElement(Processor
$ LRE.java:184)
$         at 
$ org.apache.xalan.processor.StylesheetHandler.startElement(Styl
$ esheetHandler.java:632)
$         at 
$ org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1376)
$         at 
$ org.apache.xerces.validators.common.XMLValidator.callStartElem
$ ent(XMLValidator.java:1170)
$ 
$         at 
$ org.apache.xerces.framework.XMLDocumentScanner$ContentDispatch
$ er.dispatch(XMLDocumentScan
$ ner.java:994)
$         at 
$ org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDo
$ cumentScanner.java:381)
$         at 
$ org.apache.xerces.framework.XMLParser.parse(XMLParser.java:952)
$         at 
$ org.apache.xalan.processor.TransformerFactoryImpl.newTemplates
$ (TransformerFactoryImpl.jav
$ a:795)
$         at 
$ org.apache.xalan.processor.TransformerFactoryImpl.newXMLFilter
$ (TransformerFactoryImpl.jav
$ a:486)
$         at 
$ org.apache.fop.apps.TraxInputHandler.getXMLFilter(TraxInputHan
$ dler.java:84)
$         at java.lang.reflect.Method.invoke(Native Method)
$         at 
$ org.apache.fop.apps.XSLTInputHandler.getParser(XSLTInputHandle
$ r.java:102)
$         at com.cpb.util.PDFWriter.renderXML(PDFWriter.java:89)
$         at com.cpb.util.PDFWriter.Print(PDFWriter.java:70)
$         at com.cpb.util.PDFWriter.main(PDFWriter.java:43)
$ Exception: org.apache.fop.apps.FOPException
$ **************************************************************
$ **************************
$ 
$ 
$ -----Original Message-----
$ From: Katiyar, Bhawana [mailto:Bhawana.Katiyar@workscape.com]
$ Sent: Thursday, June 06, 2002 7:30 PM
$ To: chandrakant_binwani
$ Subject: RE: Problem with PDF generation
$ 
$ 
$ Try catching and printing the exception and then send that 
$ exception to fop-users list. There will certainly be an exception.
$ Thanks
$ Bhawana
$ 
$ -----Original Message-----
$ From: chandrakant_binwani [mailto:chandrakant_binwani@infosys.com]
$ Sent: Thursday, June 06, 2002 4:42 AM
$ To: fop-user@xml.apache.org
$ Subject: Problem with PDF generation
$ 
$ 
$ 
$ While trying to generate a PDF from a xml using a xsl...
$ the pdf generated is a 0KB one.
$ 
$ Driver driver = new Driver();
$ driver.setRenderer(Driver.RENDER_PDF);
$ XMLReader parser = input.getParser();
$ driver.setOutputStream(new FileOutputStream(pdffile));
$ driver.render(parser, input.getInputSource());
$ 
$ I'm using FOP version fop-0.20.3.
$ There were no errors while pdf generation.
$ What could be the problem ??
$ 
$ Regards,
$ Chandrakant.
$ 

Mime
View raw message