public class FormattingElementsConfiguration extends Object
Formatting Elements are DITA elements whose primary purpose is to affect the rendering style of their text contents. Normally, Formatting Elements occur as 'inline' elements, that is, children of 'block' elements that contain mixed-content (i.e. elements and text).
This class provides various settings for specifying the formatting elements.
DITA Merge provides the default list of DITA elements which will be marked as formatting elements if the formatting elements are enabled. The formatting elements processing will be enabled when FormattingElementsConfiguration is set on the merge object.
The default list is "apiname, b, cite, cmdname, codeph, filepath, i, lines, msgnum, msgph, parmname, pre, q, sep, sub, sup, systemoutput, term, tm, tt, u, uicontrol, userinput, var, wintitle". This list can be updated using the methods from this class.
Constructor and Description |
---|
FormattingElementsConfiguration()
Constructs FormattingElementConfiguration.
|
Modifier and Type | Method and Description |
---|---|
void |
addFormattingElements(Set<String> value)
A set of formatting element names, which will be added to the value of the
formatting elements list.
|
void |
enableFormattingElements(boolean value)
This method is used to enable or disable formatting elements processing
By default, the formatting elements processing is disabled.
|
Set<String> |
getFormattingElements()
Returns the set of formatting element names.
|
boolean |
isFormattingElementsEnabled()
Returns true if formatting elements processing is enabled.
|
void |
removeFormattingElements(Set<String> value)
A set of formatting element names, which will be removed from the value of the
formatting elements list.
|
void |
setFormattingElements(Set<String> value)
Sets the list of formatting elements.
|
public FormattingElementsConfiguration()
public void enableFormattingElements(boolean value)
value
- a boolean value to enable/disable formatting elementspublic boolean isFormattingElementsEnabled()
public void setFormattingElements(Set<String> value) throws IllegalArgumentException
Sets the list of formatting elements. This setting overrides the built in list of formatting elements.
The built in list is shown in the default.
Default:
"apiname, b, cite, cmdname, codeph, filepath, i, lines, msgnum, msgph, parmname, pre, q, sep, sub, sup, systemoutput, term, tm, tt, u, uicontrol, userinput, var, wintitle"
value
- a set of formatting element namesIllegalArgumentException
- if the value is nullpublic Set<String> getFormattingElements()
Returns the set of formatting element names.
public void addFormattingElements(Set<String> value) throws IllegalArgumentException
A set of formatting element names, which will be added to the value of the formatting elements list.
value
- a set of formatting element names to be added to existing listIllegalArgumentException
- if the value is nullpublic void removeFormattingElements(Set<String> value) throws IllegalArgumentException
A set of formatting element names, which will be removed from the value of the formatting elements list.
value
- a set of formatting element names to be removed from existing listIllegalArgumentException
- if the value is nullCopyright © 2023 Deltaman Group Ltd. All Rights Reserved.