[ 
https://issues.apache.org/jira/browse/FOP-3069?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Joao Goncalves closed FOP-3069.
-------------------------------
    Resolution: Fixed

https://github.com/apache/xmlgraphics-fop/commit/e3e6e8b54c75091fc0d172f32ce6bec563ac782d

> Empty <fo:table.body> results in infinite loop when strict-validation is set 
> to false
> -------------------------------------------------------------------------------------
>
>                 Key: FOP-3069
>                 URL: https://issues.apache.org/jira/browse/FOP-3069
>             Project: FOP
>          Issue Type: Bug
>          Components: fo/unqualified
>    Affects Versions: 1.1, 2.0, 2.1, 2.2, 2.3, 2.4, 2.6, 2.7, 2.8
>            Reporter: Michael Kainzbauer
>            Assignee: Joao Goncalves
>            Priority: Major
>
> +_Since Apache FOP 1.1 (not reproducible in 1.0)_+
> When disabling strict-validation, ApacheFOP will loop infinitely when a 
> <fo:table.body> is empty, e.g.: <fo:table.body/>
> As a result in class
> {color:#57d9a3}org.apache.fop.layoutmgr.BlockContainerLayoutManager.getNextKnuthElements(LayoutContext
>  context, int alignment);{color}
> (line 111)
> is called infinitely.
> Yes, the XML-FO is incorrect and not according to the standard, but this is 
> an issue that can cause real trouble when the given conditions are met. 
> Turning on strict-validation will result in an error with a clear and 
> understandable error message:
> {quote}{color:#57d9a3}{{Error on line 26 column 29 }}{color}
> {color:#57d9a3}{{  SXCH0003  org.apache.fop.fo.ValidationException: 
> "fo:table-body" is missing child}}{color}
> {color:#57d9a3}{{  elements. Required content model: marker* 
> (table-row+|table-cell+) (Siehe Position 26:29).}}{color}
> {color:#57d9a3}{{  Caused by org.apache.fop.fo.ValidationException: 
> null:26:29: "fo:table-body" is missing}}{color}
> {color:#57d9a3}{{  child elements. Required content model: marker* 
> (table-row+|table-cell+) (See position 26:29)}}{color}
> {quote}
> Example XML-FO:
> {quote}<?xml version="1.0" encoding="UTF-8"?>
> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format";>
> <fo:layout-master-set>
> <fo:simple-page-master master-name="A4-main" page-width="210mm" 
> page-height="297mm">
> <fo:region-body margin-bottom="10mm" margin-left="20mm" margin-right="5mm" 
> margin-top="10mm"/>
> <fo:region-before extent="10mm" region-name="main-reg-before"/>
> <fo:region-after extent="10mm" region-name="main-reg-after"/>
> </fo:simple-page-master>
> <fo:page-sequence-master master-name="basic">
> <fo:repeatable-page-master-alternatives>
> <fo:conditional-page-master-reference master-reference="A4-main" 
> page-position="any"/>
> </fo:repeatable-page-master-alternatives>
> </fo:page-sequence-master>
> </fo:layout-master-set>
> <fo:page-sequence master-reference="basic">
> <fo:static-content flow-name="main-reg-before">
> <fo:block/>
> </fo:static-content>
> <fo:static-content flow-name="main-reg-after">
> <fo:block/>
> </fo:static-content>
> <fo:flow flow-name="xsl-region-body">
> <fo:block-container>
> <fo:block-container>
> <fo:table>
> <fo:table-body/>
> </fo:table>
> </fo:block-container>
> </fo:block-container>
> </fo:flow>
> </fo:page-sequence>
> </fo:root>{quote}
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to