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

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

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            gberg Gregor Berg

            Dates

              Created:
              Updated:

              Slack

                Issue deployment