Class DitaMarkup

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

public class DitaMarkup extends Object
The DITA markup output format specific parameters provide control over how the 'rev' and 'status' attributes are used to represent change.
  • Constructor Details

    • DitaMarkup

      public DitaMarkup()
      Creates a new DitaMarkup instance. The DITA markup output format specific parameters provide control over how the 'rev' and 'status' attributes are used to represent change.
  • Method Details

    • isAddOutputClassAtts

      public boolean isAddOutputClassAtts()
      Gets the value of the addOutputClassAtts parameter.
      Returns:
      the value of the addOutputClassAtts parameter
    • setAddOutputClassAtts

      public void setAddOutputClassAtts(boolean value)

      Specifies whether to include an outputclass attribute for marking changes.

      NOTE: This option only applies to the DITA Markup format.

      Default: "false"

      Parameters:
      value - the value to set for the addOutputClassAtts parameter
    • isAddRevisionAtts

      public boolean isAddRevisionAtts()
      Gets the value of the addRevisionAtts parameter.
      Returns:
      the value of the addRevisionAtts parameter
    • setAddRevisionAtts

      public void setAddRevisionAtts(boolean value)

      Specifies whether the result should use 'rev' attributes to mark change. When this property is true, any 'rev' attributes in the input that match the regex pattern in 'remove-rev-attribute-regex' are stripped before comparison.

      Default: "true"

      Parameters:
      value - the value to set for the addRevisionAtts parameter
    • isAddStatusAtts

      public boolean isAddStatusAtts()
      Gets the value of the addStatusAtts parameter.
      Returns:
      the value of the addStatusAtts parameter
    • setAddStatusAtts

      public void setAddStatusAtts(boolean value)

      Specifies whether the result should use 'status' attributes to mark change. When this property is true, any 'status' attributes in the input are stripped before comparison.

      Default: "true"

      Parameters:
      value - the value to set for the addStatusAtts parameter
    • isIncludeDeleted

      public boolean isIncludeDeleted()
      Gets the value of the includeDeleted parameter.
      Returns:
      the value of the includeDeleted parameter
    • setIncludeDeleted

      public void setIncludeDeleted(boolean value)

      Specifies whether to include deleted content in the result.

      If set to false, the result will only include unchanged and added content.

      Default: "true"

      Parameters:
      value - the value to set for the includeDeleted parameter
    • getNewOutputClass

      public String getNewOutputClass()
      Gets the value of the newOutputClass parameter.
      Returns:
      the value of the newOutputClass parameter
    • setNewOutputClass

      public void setNewOutputClass(String value)

      Specifies the string value to use for the outputclass attribute of added content.

      Added elements and text (via the <ph> parent) will have this string set as the value of the outputclass attribute in the result.

      Default: "deltaxml-add"

      Parameters:
      value - the value to set for the newOutputClass parameter
      Throws:
      IllegalArgumentException - if the value is null
    • getOldOutputClass

      public String getOldOutputClass()
      Gets the value of the oldOutputClass parameter.
      Returns:
      the value of the oldOutputClass parameter
    • setOldOutputClass

      public void setOldOutputClass(String value)

      Specifies the string value to use for the outputclass attribute of deleted content.

      Deleted elements and text (via the <ph> parent) will have this string set as the value of the outputclass attribute in the result.

      Default: "deltaxml-delete"

      Parameters:
      value - the value to set for the oldOutputclass parameter
      Throws:
      IllegalArgumentException - if the value is null
    • getNewRevision

      public String getNewRevision()
      Gets the value of the newRevision parameter.
      Returns:
      the value of the newRevision parameter
    • setNewRevision

      public void setNewRevision(String value)

      Specifies the string value to use for the rev attribute of added content.

      Added elements and text (via the <ph> parent) will have this string set as the value of the rev attribute in the result.

      Default: "deltaxml-add"

      Parameters:
      value - the value to set for the newRevision parameter
      Throws:
      IllegalArgumentException - if the value is null
    • getOldRevision

      public String getOldRevision()
      Gets the value of the oldRevision parameter.
      Returns:
      the value of the oldRevision parameter
    • setOldRevision

      public void setOldRevision(String value)

      Specifies the string value to use for the rev attribute of deleted content.

      Deleted elements and text (via the <ph> parent) will have this string set as the value of the rev attribute in the result.

      Default: "deltaxml-delete"

      Parameters:
      value - the value to set for the oldRevision parameter
      Throws:
      IllegalArgumentException - if the value is null
    • getNewVersionAtts

      public Set<AttributeWithValue> getNewVersionAtts()
      Gets the value of the newVersionAtts parameter.
      Returns:
      the value of the newVersionAtts parameter
    • setNewVersionAtts

      public void setNewVersionAtts(Set<AttributeWithValue> value)

      Specifies attributes to place on to added elements in the result.

      Default: empty set

      Parameters:
      value - the value to set for the newVersionAtts parameter
      Throws:
      IllegalArgumentException - if the value is null
    • getOldVersionAtts

      public Set<AttributeWithValue> getOldVersionAtts()
      Gets the value of the oldVersionAtts parameter.
      Returns:
      the value of the oldVersionAtts parameter
    • setOldVersionAtts

      public void setOldVersionAtts(Set<AttributeWithValue> value)

      Specifies attributes to place on deleted elements in the result.

      Default: empty set

      Parameters:
      value - the value to set for the oldVersionAtts parameter
      Throws:
      IllegalArgumentException - if the value is null
    • getPhraseContainerExclusions

      public String getPhraseContainerExclusions()
      Gets the value of the phraseContainerExclusions parameter.
      Returns:
      the value of the phraseContainerExclusions parameter
    • setPhraseContainerExclusions

      public void setPhraseContainerExclusions(String value)

      Specifies any specializations where phrases have been removed from the content model.

      These should be listed by full specialization name, e.g. topic/title, in a comma-separated list.

      If an element contains any of the items in this list as part of its class attribute, text changes within that element will not be marked using phrase elements.

      Default: ""

      Parameters:
      value - the value to set for the phraseContainerExclusions parameter
      Throws:
      IllegalArgumentException - if the value is null
    • getPhraseElementName

      public String getPhraseElementName()
      Gets the value of the phraseElementName parameter.
      Returns:
      the value of the phraseElementName parameter
    • setPhraseElementName

      public void setPhraseElementName(String value)

      Specifies the element name to use in place of <ph> or <text> in the result.

      When this parameter is left at the default empty string value, input documents that are determined to be DITA 1.3 will markup changes using a text element and other DITA versions will use a ph element. When this parameter is not the empty string, then the value of this parameter will be used as the name of the element to markup changes.

      If the input documents are specialized documents that have renamed the phrase/text element, use this method to specify the element name that should be used instead.

      N.B. It is assumed that the 'rev' attribute is allowed on the specified element.

      Default: ""

      Parameters:
      value - the value to set for the phraseElementName parameter
      Throws:
      IllegalArgumentException - if the value is null
    • getShowNonPhraseChanges

      public ShowNonPhraseChanges getShowNonPhraseChanges()
      Gets the value of the showNonPhraseChanges parameter.
      Returns:
      the value of the showNonPhraseChanges parameter
    • setShowNonPhraseChanges

      public void setShowNonPhraseChanges(ShowNonPhraseChanges value)

      Specifies how to mark changes to text where <ph> elements are not allowed.

      If text has changed within an element where phrase markup is not allowed, some other means must be used to process the changes. If this parameter is set to where-valid, the changed text is wrapped in textual delimiters e.g. -[[old text ]]- +[[new text ]]+. If the value is set to never, no markup is used and only the new text is output. If set to always then always use phrase markup to show changes, even if it will result in invalid DITA markup.

      Default: ShowNonPhraseChanges.WHERE_VALID

      Parameters:
      value - the value to set for the showNonPhraseChanges parameter
      Throws:
      IllegalArgumentException - if the value is null