Bug 43306 - ErrorMessage (text-weight=bold)
Summary: ErrorMessage (text-weight=bold)
Status: CLOSED INVALID
Alias: None
Product: Fop - Now in Jira
Classification: Unclassified
Component: pdf (show other bugs)
Version: 0.94
Hardware: Other Windows XP
: P4 minor
Target Milestone: ---
Assignee: fop-dev
URL:
Keywords: ErrorMessage
Depends on:
Blocks:
 
Reported: 2007-09-04 08:10 UTC by Drew
Modified: 2012-04-01 13:51 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Drew 2007-09-04 08:10:51 UTC
This is a new error with FOP 0.94 when transforming FO into a PDF.  0.93 simply
ignored the invalid parameter "text-weight='bold'", now in 0.94 it causes a
severe exception of unknown location.

Example erroneous code:
<fo:block text-weight="bold">
$
</fo:block>

leads to error:
SEVERE: javax.xml.transform.TransformerException:
java.lang.IllegalStateException: endElement() called for fo:root where there is
no current element.
Sep 4, 2007 11:06:33 AM org.apache.fop.cli.Main startFOP
SEVERE: Exception
javax.xml.transform.TransformerException: java.lang.IllegalStateException:
endElement() called for fo:root where there is no current element.
	at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:168)
	at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
	at org.apache.fop.cli.Main.startFOP(Main.java:160)
	at org.apache.fop.cli.Main.main(Main.java:191)

---------

; SystemID: file:/C:/DocPrep/Outbox/truthinlending/truthinlending-v02.xsl;
Line#: 4; Column#: 10
javax.xml.transform.TransformerException: java.lang.IllegalStateException:
endElement() called for fo:root where there is no current element.
	at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2416)
	at
org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2281)
	at
org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1367)
	at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:709)
	at
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1284)
	at
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1262)
	at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:165)
	at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
	at org.apache.fop.cli.Main.startFOP(Main.java:160)
	at org.apache.fop.cli.Main.main(Main.java:191)
Caused by: java.lang.IllegalStateException: endElement() called for fo:root
where there is no current element.
	at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:368)
	at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:194)
	at org.apache.xml.serializer.ToXMLSAXHandler.endElement(ToXMLSAXHandler.java:261)
	at
org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1399)
	at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411)
	... 9 more
---------
java.lang.IllegalStateException: endElement() called for fo:root where there is
no current element.
	at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:368)
	at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:194)
	at org.apache.xml.serializer.ToXMLSAXHandler.endElement(ToXMLSAXHandler.java:261)
	at
org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1399)
	at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411)
	at
org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2281)
	at
org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1367)
	at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:709)
	at
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1284)
	at
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1262)
	at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:165)
	at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
	at org.apache.fop.cli.Main.startFOP(Main.java:160)
	at org.apache.fop.cli.Main.main(Main.java:191)
Comment 1 Chris Bowditch 2007-09-04 08:25:45 UTC
text-weight is not a valid FO Property, so FOP is correct to throw an error 
telling the user that it is invalid. I couldn't tell this from your post, but 
running FOP from the command line with the FO snippet you posted I got:

javax.xml.transform.TransformerException: 
org.apache.fop.fo.ValidationException:
 file:///D:/samples/fo/bug43306.fo:10:33: Error(10/33): fo:block, Invalid 
proper
ty name 'text-weight
        at org.apache.xalan.transformer.TransformerIdentityImpl.transform
(Transf
ormerIdentityImpl.java:449)
        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:165)

The fact that it did work in FOP 0.93 just means 0.93 was incomplete in its 
Property Validation.
Comment 2 Glenn Adams 2012-04-01 13:51:46 UTC
batch transition to closed remaining pre-FOP1.0 resolved bugs