Uploaded image for project: 'FOP'
  1. FOP
  2. FOP-2763

retrieve-table-marker on nested tables causes whole tables to disappear

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.1, 2.2
    • Fix Version/s: None
    • Component/s: fo/block
    • Labels:
      None

      Description

      When fo:table with retrieve-table-marker is nested in another fo:table, invalid code causes whole inner table to disappear.

      This is probably because org.apache.fop.fo.flow.RetrieveTableMarker#findAncestor marks ALL parent table-cells up to fo:flow as HavingRetrieveTableMarker, instead of marking just current table's cell.

      See my proof of bug with demonstrations at https://github.com/jakubgwozdz/fop-retrieve-table-markers-bug

      The initial workaround could involve something like this:

        if (temp.getNameId() == FO_TABLE && (ancestorID == FO_TABLE_HEADER || ancestorID == FO_TABLE_FOOTER)) {
            return -1;
        }
      

      at /org/apache/fop/fo/flow/RetrieveTableMarker.java:104

        Attachments

        1. result.pdf
          6 kB
          Jakub Gwóźdź
        2. markers.fo.xml
          9 kB
          Jakub Gwóźdź

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              jakub.gwozdz@britebill.com Jakub Gwóźdź
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: