Class DitaMarkup
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the value of the newOutputClass parameter.Gets the value of the newRevision parameter.Gets the value of the newVersionAtts parameter.Gets the value of the oldOutputClass parameter.Gets the value of the oldRevision parameter.Gets the value of the oldVersionAtts parameter.Gets the value of the phraseContainerExclusions parameter.Gets the value of the phraseElementName parameter.Gets the value of the showNonPhraseChanges parameter.booleanGets the value of the addOutputClassAtts parameter.booleanGets the value of the addRevisionAtts parameter.booleanGets the value of the addStatusAtts parameter.booleanGets the value of the includeDeleted parameter.voidsetAddOutputClassAtts(boolean value) Specifies whether to include an outputclass attribute for marking changes.voidsetAddRevisionAtts(boolean value) Specifies whether the result should use 'rev' attributes to mark change.voidsetAddStatusAtts(boolean value) Specifies whether the result should use 'status' attributes to mark change.voidsetIncludeDeleted(boolean value) Specifies whether to include deleted content in the result.voidsetNewOutputClass(String value) Specifies the string value to use for the outputclass attribute of added content.voidsetNewRevision(String value) Specifies the string value to use for the rev attribute of added content.voidsetNewVersionAtts(Set<AttributeWithValue> value) Specifies attributes to place on to added elements in the result.voidsetOldOutputClass(String value) Specifies the string value to use for the outputclass attribute of deleted content.voidsetOldRevision(String value) Specifies the string value to use for the rev attribute of deleted content.voidsetOldVersionAtts(Set<AttributeWithValue> value) Specifies attributes to place on deleted elements in the result.voidSpecifies any specializations where phrases have been removed from the content model.voidsetPhraseElementName(String value) Specifies the element name to use in place of <ph> or <text> in the result.voidSpecifies how to mark changes to text where <ph> elements are not allowed.
-
Constructor Details
-
DitaMarkup
public DitaMarkup()Creates a newDitaMarkupinstance. 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
Gets the value of the newOutputClass parameter.- Returns:
- the value of the newOutputClass parameter
-
setNewOutputClass
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
Gets the value of the oldOutputClass parameter.- Returns:
- the value of the oldOutputClass parameter
-
setOldOutputClass
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
Gets the value of the newRevision parameter.- Returns:
- the value of the newRevision parameter
-
setNewRevision
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
Gets the value of the oldRevision parameter.- Returns:
- the value of the oldRevision parameter
-
setOldRevision
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
Gets the value of the newVersionAtts parameter.- Returns:
- the value of the newVersionAtts parameter
-
setNewVersionAtts
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
Gets the value of the oldVersionAtts parameter.- Returns:
- the value of the oldVersionAtts parameter
-
setOldVersionAtts
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
Gets the value of the phraseContainerExclusions parameter.- Returns:
- the value of the phraseContainerExclusions parameter
-
setPhraseContainerExclusions
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
Gets the value of the phraseElementName parameter.- Returns:
- the value of the phraseElementName parameter
-
setPhraseElementName
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
Gets the value of the showNonPhraseChanges parameter.- Returns:
- the value of the showNonPhraseChanges parameter
-
setShowNonPhraseChanges
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 tonever, no markup is used and only the new text is output. If set toalwaysthen 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
-