public final class WordOutfilter62 extends WordBufferingFilter
This is the outfilter for the Word by Word pipeline, which is discussed in the Word by Word Text Comparison guide.
Concatenates contents of consecutive deltaxml:word, deltaxml:punctuation and
deltaxml:space elements into deltaxml:textGroups.
Example
Comparing (after filtering withWordByWordInfilter)
<p>sample of word-by-word changes</p>with
<p>sample of word-by-word processing changes</p>gives the delta file (pretty printed)
<p deltaxml:deltaV2="A!=B"> <deltaxml:word deltaxml:deltaV2="A=B">sample</deltaxml:word> <deltaxml:space deltaxml:deltaV2="A=B"> </deltaxml:space> <deltaxml:word deltaxml:deltaV2="A=B">of</deltaxml:word> <deltaxml:space deltaxml:deltaV2="A=B"> </deltaxml:space> <deltaxml:word deltaxml:deltaV2="B">processing</deltaxml:word> <deltaxml:space deltaxml:deltaV2="B"> </deltaxml:space> <deltaxml:word deltaxml:deltaV2="A=B">changes</deltaxml:word> </p>
This filter will process the delta file to remove the word and space elements and show the changes to their contents as follows (pretty printed):
<p deltaxml:deltaV2="A!=B"> sample of word-by-word <deltaxml:textGroup deltaxml:deltaV2="B"> <deltaxml:text deltaxml:deltaV2="B">processing</deltaxml:text> </deltaxml:textGroup> changes </p>
WordOutfilter62 should always be used in conjunction with WordInfilter62. It is designed to be used as a
post-filter and should be placed at the beginning of the pipeline.
Note: This class has not been designed to be extended, therefore to err on the side of caution, it has been declared final.
WordInfilter62| Constructor and Description |
|---|
WordOutfilter62()
Creates a WordOutfilter.
|
| Modifier and Type | Method and Description |
|---|---|
void |
setwrapUnchangedText(java.lang.String value)
Sets whether unchanged text should be wrapped in a
deltaxml:textGroup. |
characters, endElement, isBufferModifiedOnly, startElement, startPrefixMappingendDocument, getClosestAttributeValueFromAncestor, getClosestAttributeValueFromAnyAncestor, getGrandParentLocalName, getParentLocalName, getParentQName, getProperty, hasAncestor, hasAncestor, hasAncestorWithAttr, hasAncestorWithAttrValue, hasAncestorWithAttrValues, outputCharacters, outputEndElement, outputStartElement, popAncestorStack, pushAncestorStack, setProperty, stackDepth, startDocumentattributeDecl, comment, elementDecl, endCDATA, endDTD, endEntity, externalEntityDecl, internalEntityDecl, parse, parse, startCDATA, startDTD, startEntityendPrefixMapping, error, fatalError, getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getParent, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setContentHandler, setDocumentLocator, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setParent, skippedEntity, unparsedEntityDecl, warningpublic void setwrapUnchangedText(java.lang.String value)
Sets whether unchanged text should be wrapped in a deltaxml:textGroup.
By default, unchanged text is not wrapped in a deltaxml:textGroup but if a value of true is passed
to this method, unchanged text will be wrapped.
setwrapUnchangedText in class WordBufferingFiltervalue - whether or not to wrap unchanged text in a deltaxml:textGroup