You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by bu...@apache.org on 2007/09/04 18:17:29 UTC
DO NOT REPLY [Bug 43307] New: - Error Message
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43307>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=43307
Summary: Error Message
Product: Fop
Version: 0.94
Platform: Other
OS/Version: other
Status: NEW
Keywords: ErrorMessage
Severity: normal
Priority: P2
Component: pdf
AssignedTo: fop-dev@xmlgraphics.apache.org
ReportedBy: drew.wells@clayton.net
Despite how the previous bug report was closed, this is still unresolved in the
public release of 0.94. If the user mistaken types in "text-weight" instead
of "font-weight", FOP reports a generic error (included below) that does not
elude to the words text-weight or a line number in which to find the problem.
I redownloaded FOP, again, just to be sure FOP was the latest release version.
I picked up:
fop-0.94-bin-jdk1.4.zip 23-Aug-2007 16:55 19M
using command: fop -xsl temp.xsl -xml temp.xml -pdf output.pdf
My entire XSL file: (with the previous erroneous data text-weight="bold")
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:java="http://xml.apache.org/xslt/java" >
<xsl:template match="/">
<fo:root>
<fo:layout-master-set>
<fo:simple-page-master margin-right=".5in" margin-left=".5in" margin-
bottom=".25in" margin-top=".5in" page-width="8.5in" page-height="11in" master-
name="Simple">
<fo:region-body margin-top="0cm"/>
<fo:region-before extent="1.5cm"/>
<fo:region-after extent="1cm"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="Simple" initial-page-number="1" force-
page-count="no-force">
<fo:flow flow-name="xsl-region-body">
<!-- ===========FO CODE STARTS =============== -->
<fo:block/>
<fo:block text-weight="bold">
$
</fo:block>
<!-- ===========FO CODE ENDS ================= -->
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
</xsl:stylesheet>
XML File:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="temp.xsl"?>
<vars>
<appid>123456</appid>
</vars>
What fop reported as the error. Read carefully, there is no mention of text-
weight:
--- Standard Error ---
Sep 4, 2007 12:15:24 PM org.apache.fop.fo.FOTreeBuilder$MainFOHandler endElement
WARNING: Mismatch: flow (http://www.w3.org/1999/XSL/Format) vs. block
(http://www.w3.org/1999/XSL/Format)
Sep 4, 2007 12:15:24 PM org.apache.fop.fo.FOTreeBuilder$MainFOHandler endElement
WARNING: Mismatch: page-sequence (http://www.w3.org/1999/XSL/Format) vs. flow
(http://www.w3.org/1999/XSL/Format)
Sep 4, 2007 12:15:24 PM org.apache.fop.fo.FOTreeBuilder$MainFOHandler endElement
WARNING: Mismatch: root (http://www.w3.org/1999/XSL/Format) vs. page-sequence
(http://www.w3.org/1999/XSL/Format)
Sep 4, 2007 12:15:24 PM org.apache.fop.fo.FOTreeBuilder fatalError
SEVERE: javax.xml.transform.TransformerException:
java.lang.IllegalStateException: endElement() called for fo:root where there is
no current element.
Sep 4, 2007 12:15:24 PM 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/temp.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)
--- Standard Output ---
"java"
If there is a newer version of FOP that you are using that has fixed this
issue, please let me know.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
DO NOT REPLY [Bug 43307] - Error Message
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43307>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=43307
------- Additional Comments From drew.wells@clayton.net 2007-09-04 09:18 -------
Created an attachment (id=20767)
--> (http://issues.apache.org/bugzilla/attachment.cgi?id=20767&action=view)
TEMP.XSL
Attached file with error of "text-weight" that caused the unhandled error in
FOP.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
DO NOT REPLY [Bug 43307] - Misleading Error Message w/ XML+XSL input
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43307>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=43307
------- Additional Comments From drew.wells@clayton.net 2007-09-04 11:07 -------
I'm getting the same error in 0.93, I pulled 0.93 from "previous fop binary
package" and it registers as 0.93 under its -v (version) option.
FOP 0.20.5 ignores the error parameter entirely:
[INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
[INFO] FOP 0.20.5
[INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
[INFO] building formatting object tree
[INFO] setting up fonts
[ERROR] property 'text-weight' ignored
[INFO] [1]
[INFO] Parsing of document complete, stopping renderer
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
DO NOT REPLY [Bug 43307] - Error Message
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43307>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=43307
------- Additional Comments From drew.wells@clayton.net 2007-09-04 09:19 -------
Created an attachment (id=20768)
--> (http://issues.apache.org/bugzilla/attachment.cgi?id=20768&action=view)
TEMP.XML
attached XML file, used for building the fo from XSL
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
DO NOT REPLY [Bug 43307] - Misleading Error Message w/ XML+XSL input
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43307>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=43307
------- Additional Comments From a_l.delmelle@pandora.be 2007-09-04 10:46 -------
Yup. Looking a bit closer, could be the bug should be filed against Xalan here (2.7.0).
Not a 100% sure, but instead of re-throwing the Exception, the XSLT processor seems to be triggered into
a flush (?)
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
DO NOT REPLY [Bug 43307] - Misleading Error Message w/ XML+XSL input
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43307>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=43307
a_l.delmelle@pandora.be changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
------- Additional Comments From a_l.delmelle@pandora.be 2007-09-05 13:10 -------
Did some further testing, and I am now definitely going to close this one.
When using other versions of Xalan, the problem does not occur. We cannot do anything about this at the
FOP side.
Try replacing your XSLT processor to avoid the problem, or check with xalan-dev if it is a known bug and
whether a patch is available.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
DO NOT REPLY [Bug 43307] - Error Message
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43307>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=43307
drew.wells@clayton.net changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |minor
Priority|P2 |P4
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
DO NOT REPLY [Bug 43307] - Error Message
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43307>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=43307
------- Additional Comments From a_l.delmelle@pandora.be 2007-09-04 10:00 -------
Confirmed. The misleading error message only appears when using XML+XSL as input. If you first perform
the XSL transform, and run the resulting FO through FOP from the command-line, then the behavior is
correct: ValidationException() on the 'text-weight' property.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
DO NOT REPLY [Bug 43307] - Misleading Error Message w/ XML+XSL input
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43307>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=43307
a_l.delmelle@pandora.be changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|Error Message |Misleading Error Message w/
| |XML+XSL input
------- Additional Comments From a_l.delmelle@pandora.be 2007-09-04 10:28 -------
Did a very quick debug session, and something very weird is going on when using XML+XSL as input.
I placed some breakpoints in PropertyList, and noticed that convertAttributeToProperty() is called 4(!)
times for the erroneous text-weight property.
Everything works nicely, up until the call to FObj.attributeError(). Instead of causing a ValidationException,
it seems the exception is swallowed by Xalan, which apparently recovers from it and happily tries to
continue the transform... Have you tried a different XSLT processor?
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
DO NOT REPLY [Bug 43307] - Misleading Error Message w/ XML+XSL input
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43307>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=43307
------- Additional Comments From a_l.delmelle@pandora.be 2007-09-04 11:20 -------
(In reply to comment #6)
> I'm getting the same error in 0.93, I pulled 0.93 from "previous fop binary
> package" and it registers as 0.93 under its -v (version) option.
OK. What I actually meant by 'different processor', was plugging in Saxon instead of Xalan (which is
distributed with FOP and bundled with some JVMs).
>
> FOP 0.20.5 ignores the error parameter entirely:
This behavior can be mimicked in 0.9x by turning off strict-validation in the configuration (see: http://
xmlgraphics.apache.org/fop/0.94/configuration.html)
It is not recommended to do so, but seems a viable option to work around this and avoid the exception
altogether.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.