Is it possible to get fop to tell me what line number, in the original xsl,
is causing a particular exception?  I get lots of
mysteries like:

Feb 14, 2007 9:34:56 AM
org.apache.fop.layoutmgr.inline.LineLayoutManager$LineBreakingAlgorithm
updateData2
WARNING: Line 1 of a paragraph overflows the available area. (fo:block, no
context info available)

Which is fine, but what paragraph?  Or:

WARNING: Mismatch: table-body (http://www.w3.org/1999/XSL/Format) vs. table
(http://www.w3.org/1999/XSL/Format)
Feb 14, 2007 9:34:56 AM org.apache.fop.fo.FOTreeBuilder$MainFOHandler
endElement

Again, fine, but I have a lot of tables in a big xsl file.  I have searched
the FAQ, but can't find any reference to this topic.
My worst one is:

Feb 14, 2007 9:34:56 AM org.apache.fop.cli.Main startFOP
SEVERE: Exception
javax.xml.transform.TransformerException:
org.apache.fop.fo.ValidationException: Error(Unknown location):
fo:table-body is missing child elements. 
Required Content Model: marker* (table-row+|table-cell+)
        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)

Which I think might be this table, but I can't tell for sure without what
amounts to a binary search, removing tables one by one until the error goes
away:

              <fo:table space-after="0pt" space-before="12pt"
table-layout="fixed" width="100%">
                <fo:table-column column-width=".25in" />
                <fo:table-column column-width="3.00in" />
                <fo:table-body font-family="sans-serif" font-weight="normal"
font-size="8.5pt">
                  <xsl:for-each select="text4">
                    <fo:table-row line-height="9pt">
                      <fo:table-cell padding="1mm" display-align="before">
                        <fo:block text-align="start">
                          <fo:external-graphic height="0.25in"
width="0.25in" src="url(green_chevron.png)" />
                        </fo:block>
                      </fo:table-cell>
                      <fo:table-cell padding="1mm" display-align="before">
                        <fo:block text-align="start">
                          <xsl:value-of select="." />
                        </fo:block>
                      </fo:table-cell>
                    </fo:table-row>
                  </xsl:for-each>
                </fo:table-body>
              </fo:table>
            </fo:block-container>

-- 
View this message in context: 
http://www.nabble.com/How-do-I-get-the-.xsl-line-number-which-caused-an-error-in-fop-.93--tf3228637.html#a8969802
Sent from the FOP - Users mailing list archive at Nabble.com.


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

Reply via email to