Several errors with FOP

2001-11-28 Thread Matteo Di Giovinazzo


I have compiled successfully FOP-1.0dev from CVS sources.
Then I run these tests:


1) -- From FO to
PDF --

fop -d -fo docs\examples\fo\simple.fo -pdf simple.pdf

The resulting output is:

[DEBUG]: Input mode:
[DEBUG]: FO
[DEBUG]: fo input file: docs\examples\fo\simple.fo
[DEBUG]: Output mode:
[DEBUG]: pdf
[DEBUG]: output file: simple.pdf
[DEBUG]: OPTIONS
[DEBUG]: no user configuration file is used [default]
[DEBUG]: debug mode on
[DEBUG]: dump configuration
[DEBUG]: quiet mode on
[INFO]: FOP 1.0dev
[INFO]: building formatting object tree
[DEBUG]: fo:block: handleWhiteSpace
[DEBUG]: fo:block: handleWhiteSpace
[DEBUG]: fo:block: handleWhiteSpace
null
org.apache.fop.apps.FOPException
 at org.apache.fop.apps.Driver.render(Driver.java:466)
 at org.apache.fop.apps.CommandLineStarter.run(CommandLineStarter.java:72)
 at org.apache.fop.apps.Fop.main(Fop.java:17)

-

java.lang.NullPointerException
 at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1094)
 at org.apache.fop.apps.Driver.render(Driver.java:461)
 at org.apache.fop.apps.CommandLineStarter.run(CommandLineStarter.java:72)
 at org.apache.fop.apps.Fop.main(Fop.java:17)

-

java.lang.NullPointerException
 at
org.apache.fop.layoutmgr.PageLayoutManager.makeNewPage(PageLayoutManager.jav
a:140)
 at
org.apache.fop.layoutmgr.PageLayoutManager.getParentArea(PageLayoutManager.j
ava:176)
 at
org.apache.fop.layoutmgr.FlowLayoutManager.getParentArea(FlowLayoutManager.j
ava:49)
 at
org.apache.fop.layoutmgr.BlockLayoutManager.getParentArea(BlockLayoutManager
.java:82)
 at
org.apache.fop.layoutmgr.LineLayoutManager.createLine(LineLayoutManager.java
:98)
 at
org.apache.fop.layoutmgr.LineLayoutManager.addChild(LineLayoutManager.java:1
22)
 at
org.apache.fop.layoutmgr.LeafNodeLayoutManager.flush(LeafNodeLayoutManager.j
ava:34)
 at
org.apache.fop.layoutmgr.TextLayoutManager.generateAreas(TextLayoutManager.j
ava:45)
 at
org.apache.fop.layoutmgr.LineLayoutManager.generateAreas(LineLayoutManager.j
ava:58)
 at
org.apache.fop.layoutmgr.BlockLayoutManager.generateAreas(BlockLayoutManager
.java:59)
 at
org.apache.fop.layoutmgr.AbstractLayoutManager.generateAreas(AbstractLayoutM
anager.java:44)
 at
org.apache.fop.layoutmgr.AbstractLayoutManager.generateAreas(AbstractLayoutM
anager.java:44)
 at
org.apache.fop.layoutmgr.PageLayoutManager.run(PageLayoutManager.java:66)
 at org.apache.fop.fo.pagination.PageSequence.format(PageSequence.java:332)
 at org.apache.fop.apps.StreamRenderer.render(StreamRenderer.java:195)
 at org.apache.fop.fo.pagination.PageSequence.end(PageSequence.java:281)
 at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:112)
 at org.apache.xerces.parsers.SAXParser.endElement(SAXParser.java:1403)
 at
org.apache.xerces.validators.common.XMLValidator.callEndElement(XMLValidator
.java:1480)
 at
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XM
LDocumentScanner.java:1204)
 at
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.
java:381)
 at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1081)
 at org.apache.fop.apps.Driver.render(Driver.java:461)
 at org.apache.fop.apps.CommandLineStarter.run(CommandLineStarter.java:72)
 at org.apache.fop.apps.Fop.main(Fop.java:17)

2) -- From FO to
AWT --

fop -d -fo docs\examples\fo\simple.fo -awt

The resulting output is:

[DEBUG]: Input mode:
[DEBUG]: FO
[DEBUG]: fo input file: docs\examples\fo\simple.fo
[DEBUG]: Output mode:
[DEBUG]: awt on screen
[DEBUG]: OPTIONS
[DEBUG]: no user configuration file is used [default]
[DEBUG]: debug mode on
[DEBUG]: dump configuration
[DEBUG]: quiet mode on
AWTStarter could not be loaded.
org.apache.fop.apps.FOPException: AWTStarter could not be loaded.
 at
org.apache.fop.apps.CommandLineOptions.getStarter(CommandLineOptions.java:43
1)
 at org.apache.fop.apps.Fop.main(Fop.java:16)

-

java.lang.reflect.InvocationTargetException: java.lang.NullPointerException
 at org.apache.fop.apps.AWTStarter.getResourceBundle(AWTStarter.java:156)
 at org.apache.fop.apps.AWTStarter.init(AWTStarter.java:81)
 at org.apache.fop.apps.AWTStarter.init(AWTStarter.java:59)
 at java.lang.reflect.Constructor.newInstance(Native Method)
 at
org.apache.fop.apps.CommandLineOptions.getStarter(CommandLineOptions.java:42
4)
 at org.apache.fop.apps.Fop.main(Fop.java:16)

-

java.lang.NullPointerException
 at org.apache.fop.apps.AWTStarter.getResourceBundle(AWTStarter.java:156)
 at org.apache.fop.apps.AWTStarter.init(AWTStarter.java:81)
 at org.apache.fop.apps.AWTStarter.init(AWTStarter.java:59)
 at java.lang.reflect.Constructor.newInstance(Native Method)
 at
org.apache.fop.apps.CommandLineOptions.getStarter(CommandLineOptions.java:42
4)
 at org.apache.fop.apps.Fop.main(Fop.java:16)



---

It seems to be two different errors! These 

Re: ERRORS IN FOP

2001-10-12 Thread Karen Lease

Hi Siarom,

The problem is that your xsl file is generating a lot of formatting
object structures and properties which are legal in the XSL
specification, but which are not yet handled correctly by FOP. Many of
these are in the extended conformance category, meaning they are the
nice things to have but not part of the core product. Fop is still
quite incomplete software. It can do a lot of useful work, but you have
to try to live with its inadequacies.

Most of the error messages you are getting indicate what FOP can't
handle, but I'll give some more explanations. Fop documentation should
have a list of what is and isn't supported, but it may well be
incomplete or out of date--it changes as the developers add new things.

margin property: this is XSL shorthand for top-margin, bottom-margin,
left-margin, and
right-margin. For FOP you will have to specify them individually.

font property: this is another shorthand which Fop doesn't understand.
Instead of 
font=bold 14pt Helvetica, you'll have to use separate attributes, like
this :
font-family=Helvetica font-weight=bold font-size=14pt

reference-orientation and text-transform are not yet supported as the
message says

Ignore all the error messages like this about border-xxx-style:
   [ERROR]: Unknown enumerated value for property 'border-top-style':
medium
are actually false. In fact, Fop shouldn't print this, and it correctly
interprets the border shorthand. But it only knows how to do
border-style=solid.

border and padding aren't supported on region-body. This is actually
stated in the XSL specification

Tables: this is why your xsl crashes completely.
FOP needs table-rows to hold the table-cell objects. It doesn't yet know
how to use the starts-row and ends-row properties on table-cell to
simulate rows. It also needs to have a table-column object for each
column, and a width attribute on the table with a fixed width. (I will
soon commit some changes which implement proportional column widths, but
you will still need the table-column and table-row objects).

So in short, you will have to modify your XSL to make things more
explicit for FOP. However, you should be able to get about the same
result.

Good luck,
Karen Lease

Siarom Egrub wrote:
 
 Hi All,
 
 Thanks for your input. I enclosed a copy of error.txt along with the XML and XSL 
files. These are just test files, as I am trying to get acquainted with FOP. Like I 
wrote in my earlier email to the group, I'm just getting started on FOP. I am not 
sure if these problems are cause due to environment settings.
 
 Sorry for been a pain!!
 
 Thanks for your help,
 
 S. Egrub
 
 Find the best deals on the web at AltaVista Shopping!
 http://www.shopping.altavista.com
 
   
 Name: error.txt
error.txtType: Plain Text (text/plain)
 Encoding: 7bit
 
Name: test.xsl
test.xslType: unspecified type (application/octet-stream)
Encoding: base64
 
Name: test.xml
test.xmlType: unspecified type (application/octet-stream)
Encoding: base64
 
   
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]


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