Class TableConfig

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

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

    • TableConfig

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

      public TableConfig(InvalidTableBehaviour invalidTableBehaviour)
      Creates a new TableConfig instance, setting the value of the invalidTableBehaviour parameter. These parameters control how tables are compared.
      Parameters:
      invalidTableBehaviour - the value of the invalidTableBehaviour parameter.
  • Method Details

    • isEnableTableProcessing

      public boolean isEnableTableProcessing()
      Get if table processing is enabled or not.
      Returns:
      the value of the enableTableProcessing parameter
    • setEnableTableProcessing

      public void setEnableTableProcessing(boolean value)

      Specifies whether to apply table processing or DITA simpletable processing.

      Table processing ensures that when valid (both syntactically and semantically according to either the OASIS CALS table model documentation or HTML-4/5 documentation) input tables are provided the result will be a valid table.

      Simple changes to the table, such as changing the contents of an entry/cell and adding a row or column are generally represented as fine grain changes. Because 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 - whether to enable or disable table processing.
    • 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: