Class TableConfig

java.lang.Object
com.deltaxml.docbook.config.TableConfig

public class TableConfig extends Object
These parameters control how tables are compared.
  • Constructor Details

    • TableConfig

      public TableConfig()
      Create a new TableConfig instance. These parameters control how tables are compared.
  • Method Details

    • isCalsTableProcessing

      public boolean isCalsTableProcessing()
      Gets the value of the calsTableProcessing parameter.
      Returns:
      the value of the calsTableProcessing parameter
    • setCalsTableProcessing

      public void setCalsTableProcessing(boolean value)

      Specifies whether to apply CALS table processing.

      CALS table processing ensures that when valid (both syntactically and semantically according to the OASIS CALS table model documentation) input tables are provided the result will be a valid CALS table.

      Simple changes to the table, such as changing the contents of an entry, adding a row or column are generally represented as fine grain changes. Because CALS entries can overlap or span multiple rows and columns, some types of change are difficult to represent at fine granularity, whilst ensuring validity. In these cases changes are represented at row (ie, groups of added/deleted rows) or even whole-table granularity.

      Setting this parameter to false turns off this processing, therefore it is possible to generate an invalid table. However, if table validity is not a concern changes may be represented at finer granularity.

      Default: true

      Parameters:
      value - the value to set for the calsTableProcessing parameter
    • isHtmlTableProcessing

      public boolean isHtmlTableProcessing()
      Gets the value of the htmlTableProcessing parameter.
      Returns:
      the value of the htmlTableProcessing parameter
    • setHtmlTableProcessing

      public void setHtmlTableProcessing(boolean value)

      Specifies whether to apply html table or DITA simpletable processing.

      HTML tables processing ensures that when valid input tables are provided - according to the HTML-4 or draft HTML-5 documentation - the result will be a valid HTML-4/5 table. Note that both inputs need to follow the same standard (ie be HTML-4 or HTML-5).

      Simple changes to the table, such as changing the contents of a cell and adding a row or column are generally represented as fine grain changes. Because HTML entries can overlap or span multiple rows and columns, some types of change are difficult to represent at fine granularity, whilst ensuring validity. In these cases changes are represented at row (ie, groups of added/deleted rows) or even whole-table granularity.

      DITA Simple tables are also handled by this filter. In this case, the syntactic constraints ensure that cells cannot overlap or span either rows or columns, therefore changes are represented at a fine grained level of detail.

      Setting this parameter to false turns off this processing, therefore it is possible to generate an invalid table. However, if table validity is not a concern changes may be represented at finer granularity.

      Default: true

      Parameters:
      value - the value to set for the htmlTableProcessing parameter
    • getInvalidTableBehaviour

      public InvalidTableBehaviour getInvalidTableBehaviour()
      Gets the value of the invalidTableBehaviour parameter.
      Returns:
      the value of the invalidTableBehaviour parameter
    • setInvalidTableBehaviour

      public void setInvalidTableBehaviour(InvalidTableBehaviour value)

      In order to ensure that only valid CALS tables are passed to our specialized CALS table processing, each input table is marked either valid or invalid. This parameter declares what type of processing should be used for those tables that are marked as invalid. The 'warning report mode' parameter configures how recoverable errors are reported.

      Three options are provided: fail, propagate up, and compare as XML. The fail option stops the comparison by throwing an appropriate exception (that includes the errors identified by the validity checker). The propagate up option ensures that changes to an invalid table (or more specifically 'tgroup') are represented at the table level. The compare as XML option essentially compares the tables as if they were well-formed XML.

      Note that the results of the compare as XML option can differ from comparing the tables without CALS table processing enabled, as a small amount of CALS specific processing is applied to invalid tables in order to allow them to be compared against a similar valid table.

      Default: InvalidTableBehaviour.PROPAGATE_UP

      Parameters:
      value - the value to set for the invalidTableBehaviour parameter
      Throws:
      IllegalArgumentException - if the value is null
      See Also:
    • isMarkCalsTableCellSpanExtentChanges

      public boolean isMarkCalsTableCellSpanExtentChanges()
      Gets the value of the markCalsTableCellSpanExtentChanges parameter.
      Returns:
      the value of the markCalsTableCellSpanExtentChanges parameter
    • setMarkCalsTableCellSpanExtentChanges

      public void setMarkCalsTableCellSpanExtentChanges(boolean value)
      Sets the markCalsTableCellSpanExtentChanges feature on or off. When set, a deltaxml:span-extent-changed attribute is added to table cell elements that have changed spans.

      Default: false

      Parameters:
      value - A boolean value to set this feature.
    • isMarkHtmlTableCellSpanExtentChanges

      public boolean isMarkHtmlTableCellSpanExtentChanges()
      Gets the value of the markHtmlTableCellSpanExtentChanges parameter.
      Returns:
      the value of the markHtmlTableCellSpanExtentChanges parameter
    • setMarkHtmlTableCellSpanExtentChanges

      public void setMarkHtmlTableCellSpanExtentChanges(boolean value)
      Sets the markHtmlTableCellSpanExtentChanges feature on or off. When set, a deltaxml:span-extent-changed attribute is added to table cell elements that have changed spans.

      Default: false

      Parameters:
      value - A boolean value to set this feature.