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

[PATCH] removal of invalid row-span attribute values in table-cells

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.1
    • None
    • fo/unqualified
    • tested on Win7 and Mac OS 10.9

    Description

      Since I have to deal with tables edited in HTML editors which produce invalid row-span/col-span attributes, I had to work around the row-span validation error. Thus, this patch tries to recover from the validation error related to a table-cell trying to span over more rows than its parent provides.

      Affected testcases: all four IllegalRowSpanTestCase (no error is thrown, instead the table is created and can be checked for, e.g., number of rows)

      This is a first draft. If the efforts are deemed worthwhile, I would try to port it to the trunk version.

      Recovery process in detail:
      As soon as the error condition is encountered, any remaining rows are checked for PrimaryGridUnits (PGU) - if there are none, it can be assumed that only empty GridUnits are present (created as fillers to handle the row-span of an above PGU). Such rows are removed, the corresponding PGUs cope with this removal by adjusting their pgu.rows and by decreasing the row-span of their pgu.cell.
      Finally, the last valid row encountered resets its borders corresponding to its modified rowgroup (since this row may now be the last row of a table, its borders are updated accordingly).

      Attachments

        1. invalid-row-span-values.xml
          2 kB
          Gregor Berg
        2. invalid-row-span-values.pdf
          6 kB
          Gregor Berg
        3. 2015-02-20-row-span-fop-1_1v1.patch
          11 kB
          Gregor Berg

        Activity

          People

            Unassigned Unassigned
            gberg Gregor Berg
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: