public class DitaMapTopicsetCompare
extends java.lang.Object
This comparator aligns the topics between the two maps, compares the aligned topics, and returns a map, or maps, that contain the compared, added, and deleted topics. Precisely what is returned is dependent on the parameters specified in this class, as discussed in the Map Level Output Formats section of the User Guide.
Modifier and Type | Field and Description |
---|---|
protected static java.util.Map<java.lang.String,java.lang.Boolean> |
BOOLEAN_PAR_DEFAULTS |
protected java.util.Map<java.lang.String,java.lang.Boolean> |
booleanOverrides |
protected boolean |
debugFiles |
protected java.lang.String |
hostName |
protected java.io.File |
licenseFile |
protected static java.util.Map<java.lang.String,java.lang.Integer> |
PARAMETER_NAME_INDEX |
protected int |
port |
protected long[] |
redistributionLicense |
protected static java.util.Map<java.lang.String,java.lang.String> |
STRING_PAR_DEFAULTS |
protected java.util.Map<java.lang.String,java.lang.String> |
stringOverrides |
Constructor and Description |
---|
DitaMapTopicsetCompare()
Create a DITA Map comparator.
|
Modifier and Type | Method and Description |
---|---|
void |
addLicenseFile(java.io.File licenseFile)
Adds the license file for use with Flexera licensing.
|
void |
addLicenseServer(java.lang.String hostname)
Adds a license server for use with concurrent licensing.
|
void |
addLicenseServer(java.lang.String hostname,
int port)
Adds a license server and port for use with concurrent licensing.
|
void |
addProgressListener(DitaMapCompareProgressListener listener)
Add a progress listener.
|
void |
compare(java.io.File input1,
java.io.File input2,
java.io.File outputDir)
Compare two DITA maps.
|
void |
compareInPlace(java.io.File input1,
java.io.File input2)
Compare two DITA maps.
|
java.lang.String |
getAddedIdSuffix()
Returns the value of addedIdSuffix
|
java.lang.String |
getAddInlineFormattingElements()
Returns the value of addInlineFormattingElements
|
boolean |
getAddOutputclassAtts()
Returns the value of addOutputclassAtts
|
boolean |
getAddRevisionAtts()
Returns the value of addRevisionAtts
|
boolean |
getAddStatusAtts()
Returns the value of addStatusAtts
|
boolean |
getCalsTableProcessing()
Returns the value of calsTableProcessing
|
java.lang.String |
getDeletedIdSuffix()
Returns the value of deletedIdSuffix
|
boolean |
getDetectMoves()
Returns the value of detectMoves
|
org.xml.sax.EntityResolver |
getEntityResolver()
Gets the explicitly set EntityResolver in use by the comparison.
|
org.xml.sax.EntityResolver |
getEntityResolver(boolean builtInResolver)
Gets the EntityResolver in use by the comparison.
|
boolean |
getForceSpecialization()
Returns the value of forceSpecialization
|
FrameMakerTrackChangesTableChangeMode |
getFramemakerTcsTableChangeMode()
Returns the value of framemakerTcsTableChangeMode
|
boolean |
getGrouping()
Returns the value of grouping
|
boolean |
getHtmlTableProcessing()
Deprecated.
|
boolean |
getIgnoreInlineFormatting()
Returns the value of ignoreInlineFormatting
|
boolean |
getImageCompare()
Returns the value of ImageCompare
|
boolean |
getIncludeDeleted()
Returns the value of includeDeleted
|
IndentOutput |
getIndentOutput()
Returns the value of indentOutput
|
java.lang.String |
getInlineFormattingElements()
Returns the value of inlineFormattingElements
|
java.lang.String |
getInputASVGMarkupStyle()
Returns the value of inputASVGMarkupStyle
|
java.lang.String |
getInputBSVGMarkupStyle()
Returns the value of inputBSVGMarkupStyle
|
InvalidReferencedSVGBehaviour |
getInvalidReferencedSVGBehaviour()
Returns current setting for InvalidReferencedSVGBehaviour.
|
InvalidTableBehaviour |
getInvalidTableBehaviour()
Returns the value of InvalidTableBehaviour
|
java.lang.String |
getMapBackupSuffix()
Returns the value of mapBackupSuffix
|
MapCleanTemp |
getMapCleanTemp()
Returns the value of mapCleanTemp
|
java.lang.String |
getMapContextHref()
Returns the value of mapContextHref
|
MapCopyScope |
getMapCopyScope()
Returns the value of mapCopyScope
|
java.lang.String |
getMapPairRemainingMapName()
Returns the value of mapPairRemainingMapName
|
MapResultOrigin |
getMapResultOrigin()
Returns the value of mapResultOrigin
|
MapResultStructure |
getMapResultStructure()
Returns the value of mapResultStructure
|
boolean |
getMapScanTopicsForReferences()
Returns the value of mapScanTopicsForReferences
|
MapTopicExceptionPropagationMode |
getMapTopicExceptionPropagationMode() |
MapUncomparedTopicMarkup |
getMapUncomparedTopicMarkup()
Returns the value of mapUncomparedTopicMarkup
|
MathMLGranularity |
getMathMLGranularity()
Returns current setting for MathML Granularity.
|
boolean |
getMathMLProcessing()
Returns current setting for MathML Processing.
|
ModifiedAttributeMode |
getModifiedAttributeMode()
Returns the value of modifiedAttributeMode
|
java.lang.String |
getMoveSourceRevision()
Returns the value of moveSourceRevision
|
java.lang.String |
getMoveTargetRevision()
Returns the value of moveTargetRevision
|
java.lang.String |
getNewOutputclass()
Returns the value of newOutputclass
|
java.lang.String |
getNewRevision()
Returns the value of newRevision
|
java.util.Set<AttributeWithValue> |
getNewVersionAtts()
Returns the value of newVersionAtts
|
protected java.lang.String |
getNewVersionAttsString() |
java.lang.String |
getOldOutputclass()
Returns the value of oldOutputclass
|
java.lang.String |
getOldRevision()
Returns the value of oldRevision
|
java.util.Set<AttributeWithValue> |
getOldVersionAtts()
Returns the value of oldVersionAtts
|
protected java.lang.String |
getOldVersionAttsString() |
java.lang.String |
getOutputEncodingDeclaration()
Returns the value of outputEncodingDeclaration
|
OutputFormat |
getOutputFormat()
Returns the value of outputFormat
|
OutputImageRefForm |
getOutputImageRefForm()
Returns current setting for OutputImageRefForm for topic only comparison.
|
OxygenTrackChangesDeletedSpaceMode |
getOxygenTcsDeletedSpaceMode()
Returns the value of oxygenTcsDeletedSpaceMode
|
java.lang.String |
getOxygenTcsVersion()
Returns the value of oxygenTcsVersion
|
java.lang.String |
getPhraseContainerExclusions()
Returns the value of phraseContainerExclusions
|
java.lang.String |
getPhraseElementName()
Returns the value of phraseElementName
|
PreservationMode |
getPreservationMode()
Returns the value of preservationMode
|
java.lang.String |
getRemoveInlineFormattingElements()
Returns the value of removeInlineFormattingElements
|
boolean |
getRemoveMoveSource()
Returns the value of removeMoveSource
|
java.lang.String |
getRemoveRevAttributeRegex()
Returns the value of removeRevAttributeRegex
|
ShowNonPhraseChanges |
getShowNonPhraseChanges()
Returns the value of showNonPhraseChanges
|
StepsConflictResolution |
getStepsConflictResolution()
Returns the value of stepsConflictResolution
|
boolean |
getStrictTaskModel()
Returns the value of StrictTaskModel
|
boolean |
getSVGFallback()
Returns current setting for SVG Processing Fallback.
|
double |
getSVGFallbackChangePercentage()
Returns current setting for SVG Fallback Change Percentage.
|
SVGGranularity |
getSVGGranularity()
Returns current setting for SVG Granularity.
|
boolean |
getSVGNumericTolerance()
Determines whether to use numeric tolerance.
|
java.lang.String |
getSVGNumericToleranceValue()
Returns the value of svg-numeric-tolerance-value
|
boolean |
getSVGProcessing()
Returns current setting for SVG Processing.
|
boolean |
getSVGZIndex()
Determines whether to use numeric tolerance.
|
java.lang.String |
getTopicPublicId()
Returns the value of topicPublicId
|
java.lang.String |
getTopicSystemId()
Returns the value of topicSystemId
|
java.lang.String |
getTrackedChangesAuthor()
Returns the value of trackedChangesAuthor
|
java.lang.String |
getTrackedChangesDate()
Returns the value of trackedChangesDate
|
UnmarkedChangeMode |
getUnmarkedChangeMode()
Returns the value of unmarkedChangeMode
|
javax.xml.transform.URIResolver |
getURIResolver()
Gets the explicitly set URIResolver in use by the comparison.
|
javax.xml.transform.URIResolver |
getURIResolver(boolean builtInResolver)
Gets the URIResolver in use by the comparison.
|
boolean |
getUseIdsAsKeys()
Returns the value of useIdsAsKeys
|
boolean |
getValidateInputs()
Returns the value of validateInputs
|
WarningReportMode |
getWarningReportMode()
Returns the value of warningReportMode
|
WhitespaceProcessingMode |
getWhitespaceProcessingMode()
Returns the value of whitespaceProcessingMode
|
boolean |
getWordByWord()
Returns the value of wordByWord
|
XmetalTrackChangesTableChangeMode |
getXmetalTcsTableChangeMode()
Returns the value of xmetalTcsTableChangeMode
|
XmlVersionDeclaration |
getXmlVersionDeclaration()
Returns the value of xmlVersionDeclaration
|
java.lang.String |
getZIndexSVGMarkupStyle()
Returns the value of ZIndexSVGMarkupStyle
|
void |
removeProgressListener(DitaMapCompareProgressListener listener)
Remove a progress listener.
|
void |
setAddedIdSuffix(java.lang.String value)
Sets the suffix that is added to ids of added element whose value is changed because of duplication .
|
void |
setAddInlineFormattingElements(java.lang.String value)
A comma and/or space separated list of inline formatting elements, which will be added to the value of the
inline-formatting-elements parameter
|
void |
setAddOutputclassAtts(boolean value)
Specifies whether to include an outputclass attribute for marking changes.
|
void |
setAddRevisionAtts(boolean value)
Specifies whether the result should use 'rev' attributes to mark change.
|
void |
setAddStatusAtts(boolean value)
Specifies whether the result should use 'status' attributes to mark change.
|
void |
setCalsTableProcessing(boolean value)
Specifies whether to apply CALS table processing or DITA simpletable processing.
|
void |
setDeletedIdSuffix(java.lang.String value)
Sets the suffix that is added to ids of deleted element whose value is changed because of duplication .
|
void |
setDetectMoves(boolean value)
Specifies whether to enable or disable move detection feature during comparison.
|
void |
setEntityResolver(org.xml.sax.EntityResolver resolver,
boolean fallbackToDefaultCatalogResolver)
Sets the EntityResolver to use during the comparison.
|
void |
setForceSpecialization(boolean value)
Specifies whether or not to force result specialization when the input types are different.
|
void |
setFramemakerTcsTableChangeMode(FrameMakerTrackChangesTableChangeMode value)
Specifies how changes in tables should be tracked.
|
void |
setGrouping(boolean value)
Specifies whether adjacent changes (insertions or deletions) should be grouped into a single insertion and/or deletion block.
|
void |
setHtmlTableProcessing(boolean value)
Deprecated.
|
void |
setIgnoreInlineFormatting(boolean value)
If set to
true , any changes that consist only of the addition, deletion or modification of DITA inline markup
elements are not noted as changes. |
void |
setIgnoreInlineFormatting(java.lang.String value) |
void |
setImageCompare(boolean value)
Specifies whether to enable or disable image comparison.
|
void |
setIncludeDeleted(boolean value)
Specifies whether to include deleted content in the result.
|
void |
setIndentOutput(IndentOutput value)
Sets whether the result should be indented.
|
void |
setInlineFormattingElements(java.lang.String value)
Sets the comma and/or space separated list of inline formatting elements.
|
void |
setInputASVGMarkupStyle(java.lang.String value)
Sets the Input A SVG markup style setting for SVG comparison results.
|
void |
setInputBSVGMarkupStyle(java.lang.String value)
Sets the Input B SVG markup style setting for SVG comparison results.
|
void |
setInvalidReferencedSVGBehaviour(InvalidReferencedSVGBehaviour value)
Sets the mode to use for handling invalid referenced SVG.
|
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.
|
void |
setLicenseFile(java.io.File licenseFile)
Deprecated.
|
void |
setLicenseServer(java.lang.String hostname)
Deprecated.
|
void |
setLicenseServer(java.lang.String hostname,
int port)
Deprecated.
|
void |
setMapBackupSuffix(java.lang.String value)
When the map comparison needs to backup a file before it can be compared it appends the '.' character followed by this suffix
to the existing file name.
|
void |
setMapCleanTemp(MapCleanTemp value)
Specifies whether to clean temporary files introduced when performing the comparison.
|
void |
setMapContextHref(java.lang.String value)
When set to the non-empty string, this parameter provides a reference to a file that stores the map context information.
|
void |
setMapCopyScope(MapCopyScope value)
Specifies how to copy a DITA map and its content to an output directory, which maintains the relative structure of the source
where this is feasible.
|
void |
setMapPairRemainingMapName(java.lang.String value)
When the map-result-structure parameter is set to map-pair, the comparison result contains two maps.
|
void |
setMapResultOrigin(MapResultOrigin value)
When comparing the topics referenced in two maps, one of the maps is declared to be the result origin.
|
void |
setMapResultStructure(MapResultStructure value)
Specifies how the result map is constructed.
|
void |
setMapScanTopicsForReferences(boolean value)
Specify whether topics should be scanned when identifying a map's referenced resources (referents).
|
void |
setMapTopicExceptionPropagationMode(MapTopicExceptionPropagationMode value)
What action to perform when there is an exception raised during the processing of a topic during a map file comparison.
|
void |
setMapUncomparedTopicMarkup(MapUncomparedTopicMarkup value)
What action to perform on topics that are not compared.
|
void |
setMathMLGranularity(MathMLGranularity value)
Specifies type of MathML processing.Will only work if MathMLProcessing is set to 'true'
|
void |
setMathMLProcessing(boolean value)
Specifies whether to apply MathML processing.
|
void |
setModifiedAttributeMode(ModifiedAttributeMode value)
Specifies how modified attributes should be included in the output.
|
void |
setMoveSourceRevision(java.lang.String value)
Specifies the string value to use for the rev attribute for source of moved content.
|
void |
setMoveTargetRevision(java.lang.String value)
Specifies the string value to use for the rev attribute for target of moved content.
|
void |
setNewOutputclass(java.lang.String value)
Specifies the string value to use for the outputclass attribute of added content.
|
void |
setNewRevision(java.lang.String value)
Specifies the string value to use for the rev attribute of added content.
|
void |
setNewVersionAtts(java.util.Set<AttributeWithValue> value)
Specifies attributes to place on to added elements in the result.
|
void |
setOldOutputclass(java.lang.String value)
Specifies the string value to use for the outputclass attribute of deleted content.
|
void |
setOldRevision(java.lang.String value)
Specifies the string value to use for the rev attribute of deleted content.
|
void |
setOldVersionAtts(java.util.Set<AttributeWithValue> value)
Specifies attributes to place on deleted elements in the result.
|
void |
setOutputEncodingDeclaration(java.lang.String value)
Sets the character encoding output to use in the XML declaration.
|
void |
setOutputFormat(OutputFormat value)
Specifies what type of output is produced.
|
void |
setOutputImageRefForm(OutputImageRefForm value)
Specifies output image reference form after image comparison for topic only comparison.
|
void |
setOxygenTcsDeletedSpaceMode(OxygenTrackChangesDeletedSpaceMode value)
Specifies how deleted spaces should be handled.
|
void |
setOxygenTcsVersion(java.lang.String value)
Specifies the version of oXygen editor used to display, accept and reject the tracked changes.
|
void |
setPhraseContainerExclusions(java.lang.String value)
Specifies any specializations where phrases have been removed from the content model.
|
void |
setPhraseElementName(java.lang.String value)
Specifies the element name to use in place of <ph> in the result.
|
void |
setPreservationMode(PreservationMode value)
Sets the mode to use for preserving original data.
|
void |
setRedistributionLicenseContent(long[] license)
Sets a redistribution license for use with subsequent compare operations.
|
void |
setRemoveInlineFormattingElements(java.lang.String value)
A comma and/or space separated list of inline formatting elements, which will be removed from the value of the
inline-formatting-elements parameter
|
void |
setRemoveMoveSource(boolean value)
Specifies whether to remove move source.
|
void |
setRemoveRevAttributeRegex(java.lang.String value)
'rev' attributes in the input could be confused with those used to represent change in the output.
|
void |
setShowNonPhraseChanges(ShowNonPhraseChanges value)
Specifies how to mark changes to text where <ph> elements are not allowed.
|
void |
setStepsConflictResolution(StepsConflictResolution value)
Specifies how to resolve conflicts between a task body's mutually exclusive steps and steps-unordered elements.
|
void |
setStrictTaskModel(boolean value)
Specifies whether to use the strict task model.
|
void |
setSVGFallback(boolean value)
Sets whether to fallback to
SVGGranularity.ADJACENT . |
void |
setSVGFallbackChangePercentage(double value)
Sets fallback change percentage setting for SVG comparison results.
|
void |
setSVGGranularity(SVGGranularity value)
Specifies the granularity at which the differences between two SVG images will be represented.
|
void |
setSVGNumericTolerance(boolean value)
Sets whether to use a numeric tolerance.
|
void |
setSVGNumericToleranceValue(java.lang.String value)
Sets SVG numeric tolerance value for SVG comparison results.
|
void |
setSVGProcessing(boolean value)
Sets whether to do should do SVG comparison.
|
void |
setSVGZIndex(boolean value)
Enable Z-Index.
|
void |
setTopicPublicId(java.lang.String value)
Specifies the publicId to use for a Topic doctype.
|
void |
setTopicSystemId(java.lang.String value)
Specifies the systemId to use for a Topic doctype.
|
void |
setTrackedChangesAuthor(java.lang.String value)
Specifies the author name that is embedded into the generated insertion and deletion processing instruction.
|
void |
setTrackedChangesDate(java.lang.String value)
Specifies the time-stamp that is embedded into the generated insertion and deletion processing instruction.
|
void |
setUnmarkedChangeMode(UnmarkedChangeMode value)
Specifies how to handle data that cannot contain difference markup.
|
void |
setURIResolver(javax.xml.transform.URIResolver resolver,
boolean fallbackToDefaultCatalogResolver)
Sets the URIResolver to use during the comparison.
|
void |
setUseIdsAsKeys(boolean value)
Specifies whether to use id attribute value as keys in order to provide identity during comparison.
|
void |
setValidateInputs(boolean value)
Specifies whether to validate input documents.
|
void |
setWarningReportMode(WarningReportMode value)
Sets the mode to use for reporting recoverable errors and warnings.
|
void |
setWhitespaceProcessingMode(WhitespaceProcessingMode value)
Specifies how to handle whitespace changes.
|
void |
setWordByWord(boolean value)
Specifies whether to perform detailed text comparison or not.
|
void |
setXmetalTcsTableChangeMode(XmetalTrackChangesTableChangeMode value)
Specifies how changes in tables should be tracked.
|
void |
setXmlVersionDeclaration(XmlVersionDeclaration value)
Sets the version to use in the XML declaration.
|
void |
setZIndexSVGMarkupStyle(java.lang.String value)
Sets the Z Index SVG markup style for SVG comparison results.
|
protected long[] redistributionLicense
protected java.io.File licenseFile
protected java.lang.String hostName
protected int port
protected boolean debugFiles
protected static final java.util.Map<java.lang.String,java.lang.Boolean> BOOLEAN_PAR_DEFAULTS
protected static final java.util.Map<java.lang.String,java.lang.String> STRING_PAR_DEFAULTS
protected static final java.util.Map<java.lang.String,java.lang.Integer> PARAMETER_NAME_INDEX
protected java.util.Map<java.lang.String,java.lang.Boolean> booleanOverrides
protected java.util.Map<java.lang.String,java.lang.String> stringOverrides
public DitaMapTopicsetCompare() throws ParserException
ParserException
- If the DITA map comparator cannot be created due to the availability/configuration of the
underpinning XML parser and XSLT technologies.public void setRedistributionLicenseContent(long[] license) throws LicenseException
DeltaXML Redistribution or 'OEM' customers should use this method in conjunction with supplied code which is typically compiled and integrated into their own products. The supplied code provides examples of usage. This method is not intended to be used by other types of license/customer.
This method will not throw any exceptions. Checking of the provided license is deferred until subsequent compare operations. At which time a license problem will be reported using a LicenseException.
license
- a redistribution licenseLicenseException
- When there is a problem due to licensing considerations.@Deprecated public void setLicenseFile(java.io.File licenseFile) throws java.lang.SecurityException, java.io.IOException, LicenseException
licenseFile
- the FlexLM format license fileLicenseException
- When there is a problem due to licensing considerations.java.io.IOException
- When there is a problem related to the license file.java.lang.SecurityException
- When there is a problem related to the license file.@Deprecated public void setLicenseServer(java.lang.String hostname) throws LicenseException
hostname
- of the license server host or its IP addressLicenseException
- When there is a problem due to licensing considerations.@Deprecated public void setLicenseServer(java.lang.String hostname, int port) throws java.lang.IllegalArgumentException, LicenseException
hostname
- of the license server host or its IP address.port
- the port number on the license server for the 'lmgrd' license server.java.lang.IllegalArgumentException
- if the port number is outside the allowed range.LicenseException
- When there is a problem due to licensing considerations.public void addLicenseFile(java.io.File licenseFile) throws java.lang.SecurityException, java.io.IOException, LicenseException
licenseFile
- the FlexLM format license fileLicenseException
- When there is a problem due to licensing considerations.java.io.IOException
- When there is a problem related to the license file.java.lang.SecurityException
- When there is a problem related to the license file.public void addLicenseServer(java.lang.String hostname) throws LicenseException
hostname
- of the license server host or its IP addressLicenseException
- When there is a problem due to licensing considerations.public void addLicenseServer(java.lang.String hostname, int port) throws java.lang.IllegalArgumentException, LicenseException
hostname
- of the license server host or its IP address.port
- the port number on the license server for the 'lmgrd' license server.java.lang.IllegalArgumentException
- if the port number is outside the allowed range.LicenseException
- When there is a problem due to licensing considerations.public void compare(java.io.File input1, java.io.File input2, java.io.File outputDir) throws ParserException, SerializationException, InputLoadException, InvalidInputException, DitaIOException, FilterProcessingException, LicenseException, DitaTopicProcessingException
input1
- The first input file ('A' document).input2
- The second input file ('B' document).outputDir
- The output copy locationLicenseException
- when the license cannot be read or is not validParserException
- when there is a problem creating/configuring an XML parserSerializationException
- when there is a problem writing the result FileInputLoadException
- when there is a problem loading an input FileFilterProcessingException
- when an error occurs running a filter in the pipelineInvalidInputException
- when an input file is not in the correct formatDitaIOException
- when there is a problem with locating, moving, copying, or accessing resources.DitaTopicProcessingException
public void compareInPlace(java.io.File input1, java.io.File input2) throws ParserException, SerializationException, InputLoadException, InvalidInputException, DitaIOException, FilterProcessingException, LicenseException, DitaTopicProcessingException
input1
- The first input file ('A' document).input2
- The second input file ('B' document).LicenseException
- when the license cannot be read or is not validParserException
- when there is a problem creating/configuring an XML parserSerializationException
- when there is a problem writing the result FileInputLoadException
- when there is a problem loading an input FileFilterProcessingException
- when an error occurs running a filter in the pipelineInvalidInputException
- when an input file is not in the correct formatDitaIOException
- when there is a problem with locating, moving, copying, or accessing resources.DitaTopicProcessingException
public void addProgressListener(DitaMapCompareProgressListener listener)
listener
- the progress listener to add.public void removeProgressListener(DitaMapCompareProgressListener listener)
listener
- the progress listener to remove.public org.xml.sax.EntityResolver getEntityResolver()
Gets the explicitly set EntityResolver in use by the comparison.
public org.xml.sax.EntityResolver getEntityResolver(boolean builtInResolver)
Gets the EntityResolver in use by the comparison.
builtInResolver
- Whether to get the built in resolver (with any explicit enhancement), or just the explicitly set
resolver.public void setEntityResolver(org.xml.sax.EntityResolver resolver, boolean fallbackToDefaultCatalogResolver)
Sets the EntityResolver to use during the comparison.
By default, the Apache Commons Resolver is used as an EntityResolver. If you wish to use a different one, set it up using
this method. Note you can turn off the default catalog support by providing a null
resolver and setting the
fallbackToDefaultCatalogResolver
to false
.
resolver
- The resolver to use. Using null removes an existing resolver.fallbackToDefaultCatalogResolver
- Sets whether to use the inbuilt catalog resolver if the provided resolver fails to
resolve the entity.public javax.xml.transform.URIResolver getURIResolver()
Gets the explicitly set URIResolver in use by the comparison.
public javax.xml.transform.URIResolver getURIResolver(boolean builtInResolver)
Gets the URIResolver in use by the comparison.
builtInResolver
- Whether to get the built in resolver (with any explicit enhancement), or just the explicitly set
resolver.public void setURIResolver(javax.xml.transform.URIResolver resolver, boolean fallbackToDefaultCatalogResolver)
Sets the URIResolver to use during the comparison.
By default, the Apache Commons Resolver is used as an URIResolver. If you wish to use a different one, set it up using this
method. Note you can turn off the default catalog support by providing a null
resolver and setting the
fallbackToDefaultCatalogResolver
to false
.
resolver
- The resolver to use. Using null removes an existing resolver.fallbackToDefaultCatalogResolver
- Sets whether to use the inbuilt catalog resolver if the provided resolver fails to
resolve the URI.public void setMapScanTopicsForReferences(boolean value)
Specify whether topics should be scanned when identifying a map's referenced resources (referents). It is possible for a DITA topic to directly refer to other resources rather than make use of DITA keying reuse mechanism. When this is the case, just scanning the maps for resources may not be sufficient, to identify all the resources that are referenced. Turning this option off may significantly improve the performance of the comparison, if it is known that all resources of interest are referenced directly by the maps.
Note that this setting also affects the way in which the resources are identified when copying maps to an output directory.
Default: true
value
- the value to set for the mapScanTopicsForReferences parameterpublic void setMapResultOrigin(MapResultOrigin value)
When comparing the topics referenced in two maps, one of the maps is declared to be the result origin. This is the map that is used to generate the structure and/or order of topic references in the output.
Note that the map-copy-scope parameter is used to specify what the in-scope referents are (i.e. which resources that are pointed to by the map are considered to be part of the document that the map is defining).
Default: MapResultOrigin.B_DOCUMENT
value
- the value to set for the mapResultOrigin parameterjava.lang.IllegalArgumentException
- if the value is nullpublic void setMapResultStructure(MapResultStructure value)
Specifies how the result map is constructed.
The available result structures are defined in terms of the result origin, which is the input that is being used to form the basis of the output. See the map-result-origin parameter documentation for more details.
Default: MapResultStructure.TOPIC_SET
value
- the value to set for the mapResultStructure parameterjava.lang.IllegalArgumentException
- if the value is nullpublic void setMapPairRemainingMapName(java.lang.String value)
When the map-result-structure parameter is set to map-pair, the comparison result contains two maps. An updated version of the existing origin map, and a map containing those topic references that were in the original comparison, but not in the existing origin map.
Note that when the map-scan-topics-for-references is set to true
, then the topics references within a map (and
its submaps) also includes those references that are contained within the topics themselves.
Default: "dxml-remaining.ditamap"
value
- the value to set for the mapPairRemainingMapName parameterjava.lang.IllegalArgumentException
- if the value is nullpublic void setMapCleanTemp(MapCleanTemp value)
Specifies whether to clean temporary files introduced when performing the comparison.
During the comparison those topics that are compared are initially backed up into a file
Default: MapCleanTemp.AUTOMATIC
value
- the value to set for the mapCleanTemp parameterjava.lang.IllegalArgumentException
- if the value is nullpublic void setMapBackupSuffix(java.lang.String value)
When the map comparison needs to backup a file before it can be compared it appends the '.' character followed by this suffix to the existing file name. Note that if the file already exists then an IOException will be thrown.
Default: "bak"
value
- the value to set for the mapBackupSuffix parameterjava.lang.IllegalArgumentException
- if the value is nullpublic void setMapCopyScope(MapCopyScope value)
Specifies how to copy a DITA map and its content to an output directory, which maintains the relative structure of the source where this is feasible.
Some maps will contain references to resources that are both marked for copying and cannot be made relative to the map's location. In general, the resources that are referenced from a map (referents), can be grouped according to their 'host' locations, such as a specified file system, web service, version control repository, and content management system (CMS). Each of these 'host' locations is represented as a 'top-level' directory of the output directory (and thus forms a 'forest' of 'tree' structures).
Note the output directory will also contain an additional DITA map file that includes a single reference to the copied map file. This is intended to record where the copied map is within the output directory structure, and provide a convenient point for loading the result into an DITA aware editor.
Default: MapCopyScope.LOCAL
value
- the value to set for the mapCopyScope parameterjava.lang.IllegalArgumentException
- if the value is nullpublic void setMapUncomparedTopicMarkup(MapUncomparedTopicMarkup value)
What action to perform on topics that are not compared. Some DITA aware publishing tools do not make use of revision attributes of a topicref on the referent (i.e. the topis that is being referenced). In these cases, it can be useful to mark the top-level topic element, which is being referenced by the topicref, with appropriate revision and/or status attributes. However, for output formats that are not intended for publication, such as the editor specific tracked change formats, marking up the root element on a topic file as added or deleted, could be counter productive.
Default: MapUncomparedTopicMarkup.AUTOMATIC
value
- the value to set for the mapUncomparedTopicMarkup parameterjava.lang.IllegalArgumentException
- if the value is nullpublic void setMapTopicExceptionPropagationMode(MapTopicExceptionPropagationMode value)
What action to perform when there is an exception raised during the processing of a topic during a map file comparison.
Default: MapTopicExceptionPropagationMode.SLOW_FAIL
value
- the value to set for the mapTopicExceptionPropogationMode parameterjava.lang.IllegalArgumentException
- if the value is nullpublic boolean getMapScanTopicsForReferences()
Returns the value of mapScanTopicsForReferences
setMapScanTopicsForReferences(boolean)
public MapResultOrigin getMapResultOrigin()
Returns the value of mapResultOrigin
setMapResultOrigin(MapResultOrigin)
public MapResultStructure getMapResultStructure()
Returns the value of mapResultStructure
setMapResultStructure(MapResultStructure)
public java.lang.String getMapPairRemainingMapName()
Returns the value of mapPairRemainingMapName
setMapPairRemainingMapName(String)
public MapCleanTemp getMapCleanTemp()
Returns the value of mapCleanTemp
setMapCleanTemp(MapCleanTemp)
public java.lang.String getMapBackupSuffix()
Returns the value of mapBackupSuffix
setMapBackupSuffix(String)
public MapCopyScope getMapCopyScope()
Returns the value of mapCopyScope
setMapCopyScope(MapCopyScope)
public MapUncomparedTopicMarkup getMapUncomparedTopicMarkup()
Returns the value of mapUncomparedTopicMarkup
setMapUncomparedTopicMarkup(MapUncomparedTopicMarkup)
public MapTopicExceptionPropagationMode getMapTopicExceptionPropagationMode()
public void setWordByWord(boolean value)
Specifies whether to perform detailed text comparison or not.
If set to true
, text is split into words before comparison. This allows individual word changes to be detected.
Default: true
value
- the value to set for the wordByWord parameterpublic void setWarningReportMode(WarningReportMode value)
Sets the mode to use for reporting recoverable errors and warnings.
Default: WarningReportMode.PROCESSING_INSTRUCTIONS
value
- the value to set for the warningReportMode parameterjava.lang.IllegalArgumentException
- if the value is nullWarningReportMode
public void setStepsConflictResolution(StepsConflictResolution value)
Specifies how to resolve conflicts between a task body's mutually exclusive steps and steps-unordered elements.
A task's body must have precisely one of either the steps or steps-unordered elements. When one input's task body has a steps element and the other a steps-unordered element, the output cannot contain both. Therefore, the comparison is configured to compare the children of the steps and steps-unordered elements, and choose the name of the parent element as follows:
Default: StepsConflictResolution.PREFER_B
value
- the value to set for the stepsConflictResolution parameterjava.lang.IllegalArgumentException
- if the value is nullpublic void setTopicPublicId(java.lang.String value)
Specifies the publicId to use for a Topic doctype.
A value should only be passed if you wish to override the default values for the publicId (-//OASIS//DTD DITA 1.1 Topic//EN for DITA 1.1 and -//OASIS//DTD DITA 1.2 Topic//EN for DITA 1.2)
Note that this value is only used if the following are true:
Default: ""
value
- the value to set for the topicPublicId parameterjava.lang.IllegalArgumentException
- if the value is nullpublic void setTopicSystemId(java.lang.String value)
Specifies the systemId to use for a Topic doctype.
A value should only be passed if you wish to override the default values for the publicId (http://docs.oasis-open.org/dita/v1.1/OS/dtd/topic.dtd for DITA 1.1 and http://docs.oasis-open.org/dita/v1.2/os/dtd1.2/technicalContent/dtd/topic.dtd for DITA 1.2)
Note that this value is only used if the following are true:
Default: ""
value
- the value to set for the topicSystemId parameterjava.lang.IllegalArgumentException
- if the value is nullpublic void setMapContextHref(java.lang.String value)
When set to the non-empty string, this parameter provides a reference to a file that stores the map context information.
This parameter is intended for internal use by the DITA map comparator, which uses it to provide information about the map comparison context. Current information includes the map's result origin and result structure.
Default: ""
value
- the value to set for the mapContextHref parameterjava.lang.IllegalArgumentException
- if the value is nullpublic void setCalsTableProcessing(boolean value)
Specifies whether to apply CALS table processing or DITA simpletable processing.
CALS table processing ensures that when valid (both syntactically and semantically according to the OASIS CALS table model documentation) input tables are provided the result will be a valid CALS table.
Simple changes to the table, such as changing the contents of an entry, adding a row or column are generally represented as fine grain changes. Because CALS 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
value
- the value to set for the calsTableProcessing parameterpublic 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
value
- the value to set for the InvalidTableBehaviour parameterjava.lang.IllegalArgumentException
- if the value is nullInvalidTableBehaviour
@Deprecated public void setHtmlTableProcessing(boolean value)
Specifies whether to apply html table.
HTML tables processing ensures that when valid input tables are provided - according to the HTML-4 or draft HTML-5 documentation - the result will be a valid HTML-4/5 table. Note that both inputs need to follow the same standard (ie be HTML-4 or HTML-5).
Simple changes to the table, such as changing the contents of a cell and adding a row or column are generally represented as fine grain changes. Because HTML 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.
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
value
- the value to set for the htmlTableProcessing parameterpublic void setDeletedIdSuffix(java.lang.String value)
Sets the suffix that is added to ids of deleted element whose value is changed because of duplication .
Default: "_deleted_"
value
- the value to set for the deletedIdSuffix parameterjava.lang.IllegalArgumentException
- if the value is nullpublic void setAddedIdSuffix(java.lang.String value)
Sets the suffix that is added to ids of added element whose value is changed because of duplication .
Default: "_added_"
value
- the value to set for the addedIdSuffix parameterjava.lang.IllegalArgumentException
- if the value is nullpublic void setIgnoreInlineFormatting(boolean value)
If set to true
, any changes that consist only of the addition, deletion or modification of DITA inline markup
elements are not noted as changes.
When comparing the following 2 versions with ignore-inline-formatting switched on, no changes are marked up.
<p>This is an important point</p>
<p>This is an <b>important</b> point</p>
Default: false
value
- the value to set for the ignoreInlineFormatting parameterpublic void setIgnoreInlineFormatting(java.lang.String value)
public void setInlineFormattingElements(java.lang.String value)
Sets the comma and/or space separated list of inline formatting elements. Only active when ignore-inline-formatting is set to true
This parameter overrides the built in list of DITA inline elements. If the parameter ignore-inline-formatting is set to true then the addition, deletion or modification of these elements will not be treated as changes.
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
- the value to set for the inlineFormattingElements parameterjava.lang.IllegalArgumentException
- if the value is nullpublic void setAddInlineFormattingElements(java.lang.String value)
A comma and/or space separated list of inline formatting elements, which will be added to the value of the inline-formatting-elements parameter
Use this list to add to the value of inline-formatting-elements which you wish to be ignored when considering change processing.
Elements in this list are added to the set in inline-formatting-elements, before the set in remove-inline-formatting-elements has been removed.
Default: ""
value
- the value to set for the addInlineFormattingElements parameter @throwspublic void setRemoveInlineFormattingElements(java.lang.String value)
A comma and/or space separated list of inline formatting elements, which will be removed from the value of the inline-formatting-elements parameter
Use this list to remove from the value of inline-formatting-elements when the defaults include elements you do not wish to be ignored when considering change processing.
Elements in this list are removed from the set in inline-formatting-elements, after the set in add-inline-formatting-elements has been added.
Default: ""
value
- the value to set for the removeInlineFormattingElements parameterjava.lang.IllegalArgumentException
- if the value is nullpublic void setMathMLProcessing(boolean value)
Specifies whether to apply MathML processing.
MathML processing ensures that when valid (both syntactically and semantically according to the OASIS MathML model documentation) input are provided the result will be a valid MathML.
Simple changes to the MathML equation, such as changing the contents of a MathML element, adding an element is generally represented as fine grain changes. Because MathML attributes can't be represented in the author view, some types of change are difficult to represent at fine granularity, whilst ensuring validity.
Setting this parameter to false turns off this processing, therefore it is possible to generate an invalid MathML equation. However, if table validity is not a concern changes may be represented at finer granularity.
Default: true
value
- boolean value to apply MathML processing.public void setMathMLGranularity(MathMLGranularity value)
Specifies type of MathML processing.Will only work if MathMLProcessing is set to 'true'
MathML Granularity can be of two type 'detailed-adjacent' and 'inline'.
The 'detailed-adjacent' will display the output differences side by side with the changed one with green and deleted one with red background, highlighting only the parts of the equation which are changed. However, 'inline' will display the output differences in a single side with with changed elements side by side to each other.
Setting this parameter to 'detailed-adjacent' will set it to detailed-adjacent mode and vice-versa.
Default: inline
value
- a value for type of MathML processingpublic void setSVGGranularity(SVGGranularity value)
Specifies the granularity at which the differences between two SVG images will be represented. Will only work if SVGProcessing is set to 'true'
SVG Granularity can be of two types - 'detailed-adjacent' and 'adjacent'.
The 'adjacent' mode will display both SVG images side-by-side, and 'detailed-adjacent' will do the same while also adding styling to highlight individual changes.
Default: detailed-adjacent
value
- value for type of SVGGranularitypublic void setSVGFallback(boolean value)
Sets whether to fallback to SVGGranularity.ADJACENT
. SVG comparison granularity will fallback to
SVGGranularity.ADJACENT
if SVG exceeds the number changed elements defined by FallbackChangePercentage.
value
- whether to use SVG Granularity fallbackpublic void setSVGFallbackChangePercentage(double value)
value
- a value for fallback change percentagepublic void setSVGProcessing(boolean value)
Sets whether to do should do SVG comparison.
SVG comparison is recommended as it will use SVG XML-aware features when comparing two SVG images to ensure that the result can be rendered.
value
- whether to use SVG comparisonpublic void setInputASVGMarkupStyle(java.lang.String value)
value
- the Input A SVG markup stylepublic void setInputBSVGMarkupStyle(java.lang.String value)
value
- the Input B SVG markup stylepublic void setZIndexSVGMarkupStyle(java.lang.String value)
value
- the Z Index SVG markup stylepublic java.lang.String getZIndexSVGMarkupStyle()
Returns the value of ZIndexSVGMarkupStyle
setZIndexSVGMarkupStyle(String)
public void setSVGZIndex(boolean value)
Enable Z-Index. SVG comparison will account for Z-Index changes and mark them up differently to standard change.
value
- whether to use z index markup styling in SVG comparisonpublic void setSVGNumericTolerance(boolean value)
Sets whether to use a numeric tolerance. SVG comparison will check co-ordinate values are within specified tolerance and therefore can be considered having negligible change.
value
- whether to use in SVG comparisonpublic void setSVGNumericToleranceValue(java.lang.String value)
String
- a value for numeric tolerancepublic boolean getSVGZIndex()
Determines whether to use numeric tolerance.
public boolean getSVGNumericTolerance()
Determines whether to use numeric tolerance.
public java.lang.String getSVGNumericToleranceValue()
Returns the value of svg-numeric-tolerance-value
setSVGNumericToleranceValue(String)
public void setOutputImageRefForm(OutputImageRefForm value)
Specifies output image reference form after image comparison for topic only comparison.
Default: source
value
- a value for output image reference formpublic void setStrictTaskModel(boolean value)
Specifies whether to use the strict task model.
If set to true
, the order of elements underneath <taskbody> as specified in DITA 1.0/1.1 is enforced and
corrected. Set to false if using DITA 1.2 or 1.3 with the general task model.
Default: true
value
- the value to set for the StrictTaskModel parameterpublic void setInvalidReferencedSVGBehaviour(InvalidReferencedSVGBehaviour value)
Sets the mode to use for handling invalid referenced SVG.
Default: InvalidReferencedSVGBehaviour.FAIL
value
- the value to set for the invalidReferencedSVGBehaviour parameterjava.lang.IllegalArgumentException
- if the value is nullInvalidReferencedSVGBehaviour
public boolean getWordByWord()
Returns the value of wordByWord
setWordByWord(boolean)
public WarningReportMode getWarningReportMode()
Returns the value of warningReportMode
setWarningReportMode(WarningReportMode)
public StepsConflictResolution getStepsConflictResolution()
Returns the value of stepsConflictResolution
setStepsConflictResolution(StepsConflictResolution)
public java.lang.String getTopicPublicId()
Returns the value of topicPublicId
setTopicPublicId(String)
public java.lang.String getTopicSystemId()
Returns the value of topicSystemId
setTopicSystemId(String)
public java.lang.String getMapContextHref()
Returns the value of mapContextHref
setMapContextHref(String)
public boolean getCalsTableProcessing()
Returns the value of calsTableProcessing
setCalsTableProcessing(boolean)
public InvalidTableBehaviour getInvalidTableBehaviour()
Returns the value of InvalidTableBehaviour
setInvalidTableBehaviour(InvalidTableBehaviour)
@Deprecated public boolean getHtmlTableProcessing()
Returns the value of htmlTableProcessing
setHtmlTableProcessing(boolean)
public java.lang.String getDeletedIdSuffix()
Returns the value of deletedIdSuffix
setDeletedIdSuffix(String)
public java.lang.String getAddedIdSuffix()
Returns the value of addedIdSuffix
setAddedIdSuffix(String)
public boolean getIgnoreInlineFormatting()
Returns the value of ignoreInlineFormatting
setIgnoreInlineFormatting(boolean)
public java.lang.String getInlineFormattingElements()
Returns the value of inlineFormattingElements
setInlineFormattingElements(String)
public java.lang.String getAddInlineFormattingElements()
Returns the value of addInlineFormattingElements
setAddInlineFormattingElements(String)
public java.lang.String getRemoveInlineFormattingElements()
Returns the value of removeInlineFormattingElements
setRemoveInlineFormattingElements(String)
public void setDetectMoves(boolean value)
Specifies whether to enable or disable move detection feature during comparison.
By default, this is disabled i.e set to 'false'.
If this feature is set to true then it overrides the value of the parameter ‘use-ids-as-keys’.
Default: false
value
- the value to set for the detectMoves parameterpublic boolean getDetectMoves()
Returns the value of detectMoves
setDetectMoves(boolean)
public void setRemoveMoveSource(boolean value)
Specifies whether to remove move source.
By default, this is disabled i.e set to 'false'.
Default: false
value
- the value to set for the removeMoveSource parameterpublic boolean getRemoveMoveSource()
Returns the value of removeMoveSource
setRemoveMoveSource(boolean)
public void setMoveSourceRevision(java.lang.String value)
Specifies the string value to use for the rev attribute for source of moved content.
Default: "deltaxml-move-source"
value
- the value to set for the moveSourceRevision parameterjava.lang.IllegalArgumentException
- if the value is nullpublic java.lang.String getMoveSourceRevision()
Returns the value of moveSourceRevision
setMoveSourceRevision(String)
public void setMoveTargetRevision(java.lang.String value)
Specifies the string value to use for the rev attribute for target of moved content.
Default: "deltaxml-move-target"
value
- the value to set for the moveTargetRevision parameterjava.lang.IllegalArgumentException
- if the value is nullpublic java.lang.String getMoveTargetRevision()
Returns the value of moveTargetRevision
setMoveTargetRevision(String)
public boolean getMathMLProcessing()
Returns current setting for MathML Processing.
public MathMLGranularity getMathMLGranularity()
Returns current setting for MathML Granularity.
public boolean getSVGProcessing()
Returns current setting for SVG Processing.
setSVGProcessing(boolean)
public SVGGranularity getSVGGranularity()
Returns current setting for SVG Granularity.
setSVGGranularity(SVGGranularity)
public boolean getSVGFallback()
Returns current setting for SVG Processing Fallback.
setSVGFallback(boolean)
public double getSVGFallbackChangePercentage()
Returns current setting for SVG Fallback Change Percentage.
setSVGFallbackChangePercentage(double)
public java.lang.String getInputASVGMarkupStyle()
Returns the value of inputASVGMarkupStyle
setInputASVGMarkupStyle(String)
public java.lang.String getInputBSVGMarkupStyle()
Returns the value of inputBSVGMarkupStyle
setInputBSVGMarkupStyle(String)
public void setImageCompare(boolean value)
Specifies whether to enable or disable image comparison.
Default: false
value
- the value to set for the image compare parameterpublic boolean getImageCompare()
Returns the value of ImageCompare
setImageCompare(boolean)
public OutputImageRefForm getOutputImageRefForm()
Returns current setting for OutputImageRefForm for topic only comparison.
public boolean getStrictTaskModel()
Returns the value of StrictTaskModel
setImageCompare(boolean)
public InvalidReferencedSVGBehaviour getInvalidReferencedSVGBehaviour()
Returns current setting for InvalidReferencedSVGBehaviour.
public void setOutputFormat(OutputFormat value)
Specifies what type of output is produced.
Default: OutputFormat.DITA_MARKUP
value
- the value to set for the outputFormat parameterjava.lang.IllegalArgumentException
- if the value is nullpublic void setValidateInputs(boolean value)
Specifies whether to validate input documents.
If set to true
and the inputs include a DOCTYPE, they will be validated against it. If they are not valid, the
compare method will throw an InputLoadException.
Default: true
value
- the value to set for the validateInputs parameterpublic void setUseIdsAsKeys(boolean value)
Specifies whether to use id attribute value as keys in order to provide identity during comparison.
If set to true
, elements with the same name and id value at the same XML tree level will always be matched,
regardless of their content.
This setting should only be used if id attribute values are consistent across versions.
Default: false
value
- the value to set for the useIdsAsKeys parameterpublic void setIndentOutput(IndentOutput value)
Sets whether the result should be indented.
If run with a compare method that produces a serialized result, a value of yes
causes the output to be pretty
printed.
Default: IndentOutput.NO
value
- the value to set for the indentOutput parameterjava.lang.IllegalArgumentException
- if the value is nullpublic void setWhitespaceProcessingMode(WhitespaceProcessingMode value)
Specifies how to handle whitespace changes.
When this option is set to 'show' whitespace differences are reported where possible. If the output-format is set to 'dita-markup', this will be wherever the DITA doctype allows text (as opposed to inter-element whitespace). For tracked-changes output formats, all whitespace changes can be shown.
This can lead to a significant amount of marked change throughout the document. When the parameter is set to 'ignore', whitespace differences are not shown; instead the 'B' document's whitespace is kept where possible.
Note that differences in whitespace are never ignored when the XML document explicitly states that the whitespace is
important, via the xml:space
attribute being set to 'preserve'.
The 'automatic' setting effectively behaves as either 'normalize' or 'ignore' depending on the value of the 'preservation-mode' and the 'output-format' parameters. Here, 'normalize' is chosen when: (1) the lexical preservation mode is set to 'automatic' and the output format is 'dita-markup'; or (2) the lexical preservation mode is set to either 'document' or 'docAndAttrib'. In all other cases, the automatic preservation mode is treated as if it were 'ignore'.
Default: WhitespaceProcessingMode.AUTOMATIC
value
- the value to set for the whitespaceProcessingMode parameterjava.lang.IllegalArgumentException
- if the value is nullpublic void setRemoveRevAttributeRegex(java.lang.String value)
'rev' attributes in the input could be confused with those used to represent change in the output. This parameter specifies the regular expression that matches 'rev' attributes to be stripped.
'rev' attributes that match this regex pattern are only stripped when the 'add-revision-atts' property is true.
Default: "deltaxml-.*"
value
- the value to set for the removeRevAttributeRegex parameterjava.lang.IllegalArgumentException
- if the value is nullpublic 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"
value
- the value to set for the addStatusAtts parameterpublic 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"
value
- the value to set for the addRevisionAtts parameterpublic 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"
value
- the value to set for the addOutputclassAtts parameterpublic void setOldRevision(java.lang.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"
value
- the value to set for the oldRevision parameterjava.lang.IllegalArgumentException
- if the value is nullpublic void setNewRevision(java.lang.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"
value
- the value to set for the newRevision parameterjava.lang.IllegalArgumentException
- if the value is nullpublic void setOldOutputclass(java.lang.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"
value
- the value to set for the oldOutputclass parameterjava.lang.IllegalArgumentException
- if the value is nullpublic void setNewOutputclass(java.lang.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"
value
- the value to set for the newOutputclass parameterjava.lang.IllegalArgumentException
- if the value is nullpublic void setNewVersionAtts(java.util.Set<AttributeWithValue> value)
Specifies attributes to place on to added elements in the result.
Default: empty set
value
- the value to set for the newVersionAtts parameterjava.lang.IllegalArgumentException
- if the value is nullpublic void setOldVersionAtts(java.util.Set<AttributeWithValue> value)
Specifies attributes to place on deleted elements in the result.
Default: empty set
value
- the value to set for the oldVersionAtts parameterjava.lang.IllegalArgumentException
- if the value is nullpublic void setPhraseElementName(java.lang.String value)
Specifies the element name to use in place of <ph> in the result.
If the input documents are specialized documents that have renamed the phrase 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: "ph"
value
- the value to set for the phraseElementName parameterjava.lang.IllegalArgumentException
- if the value is nullpublic void setPhraseContainerExclusions(java.lang.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: ""
value
- the value to set for the phraseContainerExclusions parameterjava.lang.IllegalArgumentException
- if the value is nullpublic 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: "where-valid"
value
- the value to set for the showNonPhraseChanges parameterjava.lang.IllegalArgumentException
- if the value is nullpublic 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"
value
- the value to set for the includeDeleted parameterpublic void setForceSpecialization(boolean value)
Specifies whether or not to force result specialization when the input types are different.
If this value is set to false
and the input documents are different DITA types, the result document will be left
in its generalized form with class attributes to indicate what the specializations are.
If this value is set to true
and the input documents are different DITA types, the result document will be
specialized to the DITA type of the second input. Please note that this may produce a result document that is not valid
against its doctype.
Default: false
value
- the value to set for the forceSpecialization parameterpublic void setGrouping(boolean value)
Specifies whether adjacent changes (insertions or deletions) should be grouped into a single insertion and/or deletion block. One benefit of this is that changes to a consecutive group of words within a sentence are gathered into one insertion and one deletion block, rather than a series of individual word swaps. This makes it easier to read and understand the changes.
Note that when either HTML or CALS table processing modes are selected, then this grouping mechanism is turned off within the context of these tables. The table processing has its own specialised grouping mechanisms.
Default: false
value
- the value to set for the grouping parameterpublic void setTrackedChangesAuthor(java.lang.String value)
Specifies the author name that is embedded into the generated insertion and deletion processing instruction.
Default: "deltaxml"
value
- the value to set for the trackedChangesAuthor parameterjava.lang.IllegalArgumentException
- if the value is nullpublic void setTrackedChangesDate(java.lang.String value)
Specifies the time-stamp that is embedded into the generated insertion and deletion processing instruction. The default time-stamp is that of the time that the comparison is run.
Default: "xsl date"
value
- the value to set for the trackedChangesDate parameterjava.lang.IllegalArgumentException
- if the value is nullpublic void setOxygenTcsVersion(java.lang.String value)
Specifies the version of oXygen editor used to display, accept and reject the tracked changes.
The format of the version is either '[0-9]+' or '[0-9]+.[0-9]+' without the enclosing string quotes, where: the first number sequence is the major number; and the optional second number sequence is the minor number.
This parameter is used to automatically set the relevant backwards compatibility options related to the oXygen tracked changes format. For example, prior to oXygen 14.0 release deleted whitespace needed to be normalised in order to consistently generate a reasonable result.
Default: "11.2"
value
- the value to set for the oxygenTcsVersion parameterjava.lang.IllegalArgumentException
- if the value is nullpublic void setOxygenTcsDeletedSpaceMode(OxygenTrackChangesDeletedSpaceMode value)
Specifies how deleted spaces should be handled.
Prior to oXygen 14 whitespace within the deleted content of a processing instruction were sometimes not displayed correctly. A work-around was to normalise the space within a deleted region.
Default: OxygenTrackChangesDeletedSpaceMode.AUTOMATIC
value
- the value to set for the oxygenTcsDeletedSpaceMode parameterjava.lang.IllegalArgumentException
- if the value is nullOxygenTrackChangesDeletedSpaceMode
public void setXmetalTcsTableChangeMode(XmetalTrackChangesTableChangeMode value)
Specifies how changes in tables should be tracked.
The XMetaL editor cannot track the addition or deletion of a row or cell within a table. Such changes can be pushed down to the cell level, pushed up to the table level (e.g. a CALS or HTML 'table' element), or ignored. The advantage of pushing the changes down to the cell content level, is that this provides the highest level of change granularity, at the cost of having to accept or reject every changed cell in the table independently.
The push up processing means that any table that contains a row or cell level update is represented by a table level add and delete.
The ignore option is similar to the way in which track changes within tables are handled in XMetaL; as neither row insertion and deletion or cell splitting and merging is tracked. However, for clarity this mode of operation ignores all changes within a table, it simply produces the 'B' version of the table.
Default: XmetalTrackChangesTableChangeMode.DOWN
value
- the value to set for the xmetalTcsTableChangeMode parameterjava.lang.IllegalArgumentException
- if the value is nullXmetalTrackChangesTableChangeMode
public void setFramemakerTcsTableChangeMode(FrameMakerTrackChangesTableChangeMode value)
Specifies how changes in tables should be tracked.
The FrameMaker editor cannot track the addition or deletion of a row or cell within a table. Such changes can be pushed down to the cell level, pushed up to the table level (e.g. a CALS or HTML 'table' element), or ignored. The advantage of pushing the changes down to the cell content level, is that this provides the highest level of change granularity, at the cost of having to accept or reject every changed cell in the table independently.
The push up processing means that any table that contains a row or cell level update is represented by a table level add and delete.
The ignore option is similar to the way in which track changes within tables are handled in FrameMaker; as neither row insertion and deletion or cell splitting and merging is tracked. However, for clarity this mode of operation ignores all changes within a table, it simply produces the 'B' version of the table.
Default: FrameMakerTrackChangesTableChangeMode.DOWN
value
- the value to set for the framemakerTcsTableChangeMode parameterjava.lang.IllegalArgumentException
- if the value is nullFrameMakerTrackChangesTableChangeMode
public void setPreservationMode(PreservationMode value)
Sets the mode to use for preserving original data.
This mode can be used to preserve information for round trip processing.
The 'automatic' setting will have an effective setting of 'roundTrip' when the output format is a tracked change format and 'docAndAttrib' otherwise.
Default: PreservationMode.AUTOMATIC
value
- the value to set for the preservationMode parameterjava.lang.IllegalArgumentException
- if the value is nullPreservationMode
public void setUnmarkedChangeMode(UnmarkedChangeMode value)
Specifies how to handle data that cannot contain difference markup.
Some differences between two XML documents cannot feasibly be displayed in a valid output document. These typically include changes to the XML declaration, doctype, internal subset and processing instructions. In these situations it is useful to specify what should be done.
Note that the internal subset can contain local element, attribute, and entity declarations, as well as processing instructions, comments, and entity-references.
Default: UnmarkedChangeMode.DOCUMENT_B_THEN_DECL_A
value
- the value to set for the unmarkedChangeMode parameterjava.lang.IllegalArgumentException
- if the value is nullpublic void setModifiedAttributeMode(ModifiedAttributeMode value)
Specifies how modified attributes should be included in the output.
Not all output formats allow the markup of attribute changes. When this is the case, a decision needs to be made on which version of the attribute should be present in the result file. This parameter is used to define what behaviour is required.
Default: ModifiedAttributeMode.AUTOMATIC
value
- the value to set for the modifiedAttributeMode parameterjava.lang.IllegalArgumentException
- if the value is nullpublic void setXmlVersionDeclaration(XmlVersionDeclaration value)
Sets the version to use in the XML declaration.
The 'system' special value is introduced; selecting it has the affect of choosing 'B' document's xml-version (as provided by the parser).
Default: XmlVersionDeclaration.SYSTEM
value
- the value to set for the xmlVersionDeclaration parameterjava.lang.IllegalArgumentException
- if the value is nullXmlVersionDeclaration
public void setOutputEncodingDeclaration(java.lang.String value)
Sets the character encoding output to use in the XML declaration. For example, 'UTF-8', 'ISO-8859-1', 'windows-1252', and 'ascii'. Precisely which encodings are available is dependent on the specific Java or .NET runtime environment that you use. Note that an invalid output encoding will cause an exception to be raised.
The 'system' special value is introduced; selecting it has the affect of choosing the 'B' document's character encoding.
Default: "system"
value
- the value to set for the outputEncodingDeclaration parameterjava.lang.IllegalArgumentException
- if the value is nullpublic OutputFormat getOutputFormat()
Returns the value of outputFormat
setOutputFormat(OutputFormat)
public boolean getValidateInputs()
Returns the value of validateInputs
setValidateInputs(boolean)
public boolean getUseIdsAsKeys()
Returns the value of useIdsAsKeys
setUseIdsAsKeys(boolean)
public IndentOutput getIndentOutput()
Returns the value of indentOutput
setIndentOutput(IndentOutput)
public WhitespaceProcessingMode getWhitespaceProcessingMode()
Returns the value of whitespaceProcessingMode
setWhitespaceProcessingMode(WhitespaceProcessingMode)
public java.lang.String getRemoveRevAttributeRegex()
Returns the value of removeRevAttributeRegex
setRemoveRevAttributeRegex(String)
public boolean getAddStatusAtts()
Returns the value of addStatusAtts
setAddStatusAtts(boolean)
public boolean getAddRevisionAtts()
Returns the value of addRevisionAtts
setAddRevisionAtts(boolean)
public boolean getAddOutputclassAtts()
Returns the value of addOutputclassAtts
setAddOutputclassAtts(boolean)
public java.lang.String getOldRevision()
Returns the value of oldRevision
setOldRevision(String)
public java.lang.String getNewRevision()
Returns the value of newRevision
setNewRevision(String)
public java.lang.String getOldOutputclass()
Returns the value of oldOutputclass
setOldOutputclass(String)
public java.lang.String getNewOutputclass()
Returns the value of newOutputclass
setNewOutputclass(String)
public java.util.Set<AttributeWithValue> getNewVersionAtts()
Returns the value of newVersionAtts
setNewVersionAtts(Set)
protected java.lang.String getNewVersionAttsString()
public java.util.Set<AttributeWithValue> getOldVersionAtts()
Returns the value of oldVersionAtts
setOldVersionAtts(Set)
protected java.lang.String getOldVersionAttsString()
public java.lang.String getPhraseElementName()
Returns the value of phraseElementName
setPhraseElementName(String)
public java.lang.String getPhraseContainerExclusions()
Returns the value of phraseContainerExclusions
setPhraseContainerExclusions(String)
public ShowNonPhraseChanges getShowNonPhraseChanges()
Returns the value of showNonPhraseChanges
setShowNonPhraseChanges(ShowNonPhraseChanges)
public boolean getIncludeDeleted()
Returns the value of includeDeleted
setIncludeDeleted(boolean)
public boolean getForceSpecialization()
Returns the value of forceSpecialization
setForceSpecialization(boolean)
public boolean getGrouping()
Returns the value of grouping
setGrouping(boolean)
public java.lang.String getTrackedChangesAuthor()
Returns the value of trackedChangesAuthor
setTrackedChangesAuthor(String)
public java.lang.String getTrackedChangesDate()
Returns the value of trackedChangesDate
setTrackedChangesDate(String)
public java.lang.String getOxygenTcsVersion()
Returns the value of oxygenTcsVersion
setOxygenTcsVersion(String)
public OxygenTrackChangesDeletedSpaceMode getOxygenTcsDeletedSpaceMode()
Returns the value of oxygenTcsDeletedSpaceMode
setOxygenTcsDeletedSpaceMode(OxygenTrackChangesDeletedSpaceMode)
public XmetalTrackChangesTableChangeMode getXmetalTcsTableChangeMode()
Returns the value of xmetalTcsTableChangeMode
setXmetalTcsTableChangeMode(XmetalTrackChangesTableChangeMode)
public FrameMakerTrackChangesTableChangeMode getFramemakerTcsTableChangeMode()
Returns the value of framemakerTcsTableChangeMode
setFramemakerTcsTableChangeMode(FrameMakerTrackChangesTableChangeMode)
public PreservationMode getPreservationMode()
Returns the value of preservationMode
setPreservationMode(PreservationMode)
public UnmarkedChangeMode getUnmarkedChangeMode()
Returns the value of unmarkedChangeMode
setUnmarkedChangeMode(UnmarkedChangeMode)
public ModifiedAttributeMode getModifiedAttributeMode()
Returns the value of modifiedAttributeMode
setModifiedAttributeMode(ModifiedAttributeMode)
public XmlVersionDeclaration getXmlVersionDeclaration()
Returns the value of xmlVersionDeclaration
setXmlVersionDeclaration(XmlVersionDeclaration)
public java.lang.String getOutputEncodingDeclaration()
Returns the value of outputEncodingDeclaration
setOutputEncodingDeclaration(String)
Copyright © 2001-2016 DeltaXML Ltd. All Rights Reserved.