Class FormattingElementsConfiguration
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 Summary
ConstructorsConstructorDescriptionConstructs FormattingElementConfiguration. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFormattingElements(Set<String> value) A set of formatting element names, which will be added to the value of the formatting elements list.voidenableFormattingElements(boolean value) This method is used to enable or disable formatting elements processing By default, the formatting elements processing is disabled.Returns the set of formatting element names.booleanReturns true if formatting elements processing is enabled.voidremoveFormattingElements(Set<String> value) A set of formatting element names, which will be removed from the value of the formatting elements list.voidsetFormattingElements(Set<String> value) Sets the list of formatting elements.
-
Constructor Details
-
FormattingElementsConfiguration
public FormattingElementsConfiguration()Constructs FormattingElementConfiguration.
-
-
Method Details
-
enableFormattingElements
public void enableFormattingElements(boolean value) This method is used to enable or disable formatting elements processing By default, the formatting elements processing is disabled.- Parameters:
value- a boolean value to enable/disable formatting elements
-
isFormattingElementsEnabled
public boolean isFormattingElementsEnabled()Returns true if formatting elements processing is enabled.- Returns:
- a boolean value
-
setFormattingElements
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"- Parameters:
value- a set of formatting element names- Throws:
IllegalArgumentException- if the value is null
-
getFormattingElements
Returns the set of formatting element names.
- Returns:
- a set of formatting element names
-
addFormattingElements
A set of formatting element names, which will be added to the value of the formatting elements list.
- Parameters:
value- a set of formatting element names to be added to existing list- Throws:
IllegalArgumentException- if the value is null
-
removeFormattingElements
A set of formatting element names, which will be removed from the value of the formatting elements list.
- Parameters:
value- a set of formatting element names to be removed from existing list- Throws:
IllegalArgumentException- if the value is null
-