See: Description
Interface | Description |
---|---|
ComparisonHeartbeatListener |
A listener which receives events from the XMLComparator indicating that progress has been made in the current comparison.
|
ErrorListener |
This interface is provided so that users can customize the error handling of the DeltaXML.com tools.
|
XMLComparatorFilter |
This class is designed to be used in an '
XMLFilter pipeline'. |
Class | Description |
---|---|
FailureSeverity |
Defines the severity of a DeltaXMLProcessingException.
|
IncompatibleTypesCombineException.IncompatibleTypesType |
Used to indicate the type of IncompatibleType error that has occurred.
|
XMLCombiner |
An instance of this abstract class can be used to combine an XML tree with a delta tree (as produced by an XMLComparator) to
reproduce the other xml tree that formed the other delta input.
|
XMLCombinerFactory |
An XMLCombinerFactory uses the factory design pattern to create XMLCombiners in a pluggable manner.
|
XMLComparator |
An instance of this abstract class can be used to compare two XML trees and produce a delta file containing their differences.
|
XMLComparatorFactory |
An XMLComparatorFactory uses the factory design pattern to create XMLComparators in a pluggable manner.
|
Exception | Description |
---|---|
AddRemoveKeyingException |
Added or deleted content in the delta should not have a key which is present in the non-delta input of a combine operation.
|
CannotCompareDeltaException |
It is not permitted to use a delta file to the input to a comparison since a meaningful delta result cannot be produced.
|
CPUCountException |
An exception indicating that the license used to activate the software does not support the number of CPUs being used.
|
DeletedSubtreeMismatchException |
A deleted/added subtree mismatch between the delta and non-delta inputs of the forward/reverse combiner respectively.
|
DeltaXMLException |
This class specifies an exceptional condition.
|
DeltaXMLProcessingException |
This class specifies an exceptional condition that occurred during the comparison and recombination processes.
|
DifferentRootElementException |
Files being compared must have equivalent root elements.
|
DifferingOrderedAttributesException |
The deltaxml:ordered attribute is placed on elements to control whether its children are compared using the ordered comparison
algorithm or the orderless algorithm.
|
IncompatibleTypesCombineException |
When applying the delta document to the input document, the node type of the delta must match that in the input documents.
|
IncorrectAttributeCombineException |
When the delta specifies that an attribute is deleted from the supplied input file (that is it has a deleted delta in a
forward-combine, or an added delta in a reverse-combine) the same attribute in the input file is expected to have the same
value as specified in the delta.
|
IncorrectPCDataCombineException |
When the delta specifies that text is deleted from the supplied input file (that is it has a deleted delta in a
forward-combine, or an added delta in a reverse-combine) the PCData in the input file is expected to match the PCData at the
same location in the delta file.
|
InvalidClarkNameException |
An exception of this type happens when the core comparator expects a Clark name, e.g.
|
InvalidDeltaValueException |
In DX1, a delta attribute should have one of the following values; "add", "delete", "WFmodify", "WFUmodify" or "unchanged".
|
InvalidExchangeElementException |
An exchange element should conform to the DX1 specification, detailed in the
specification
document.
|
InvalidLicenseException |
An exception indicating that the wrong type of license was found or supplied at runtime.
|
InvalidModifiedElementException |
A modified element must contain at least one of the following: new-attributes, old-attributes or child elements.
|
InvalidNewOrOldAttributeFormatException |
A old- or new-attributes attribute should conform to the DX1 specification, detailed in the
specification
document.
|
InvalidOriginalPositionException |
An Element has an {http://www.deltaxml.com/ns/well-formed-delta-v1}:original-position attribute which has an invalid format.
|
InvalidPCDataModifyElementException |
A PCDataModify element should conform to the DX1 specification, detailed in the
specification
document.
|
InvalidSoftKeyAttributeException |
An exception of this type happens when Soft Key attributes are used in an incorrect or ambiguous way.
|
KeylessOrderlessModifyException |
The orderless comparator cannot create a modified (A!=B) element other than through keying.
|
LicenseConcurrencyLimitException |
An exception indicating that the server-controlled concurrency limit has been exceeded.
|
LicenseContentException |
An exception indicating that the there was a problem with the license used to activate the software.
|
LicenseException |
This class groups all of the licensing related exceptions together.
|
LicenseExpiredException |
An exception indicating that the license used to activate the software has expired.
|
LicenseNotYetValidException |
An exception indicating that this license has not yet started
|
LicenseSecurityException |
An exception indicating a problem with the activation/licensing or other security related aspects of the DeltaXML software when
the JVM is using a Security Manager.
|
MissingAttributeCombineException |
When the delta specifies that an attribute is deleted from the supplied input file (that is it has a deleted delta in a
forward-combine, or an added delta in a reverse-combine) the input file is expected to have the same attribute at the
appropriate location.
|
MissingContentCombineException |
When processing an exchange, pcdataModify or textGroup elements which contain a old and new value, the item being deleted (in a
forward-combine the "old" value and in a reverse-combine the "new" value) must exist in the input document.
|
MissingDeltaAttributeException |
A changes-only context delta is required for use in a combine.
|
MissingPCDataCombineException |
When the delta specifies that text is deleted from the supplied input file (that is it has a deleted delta in a
forward-combine, or an added delta in a reverse-combine) the input file is expected to have PCData at the appropriate location.
|
NodeCapacityExceededException |
The size of the input data exceeds the capacity permitted by the activation license.
|
NoLicenseInstalledException |
An exception indicating that the software has not been sucessfully activated with an appropriate license.
|
NoMatchingDeltaItemCombineException |
A delta file should contain a delta representing each item in both of the input files used for comparison, unless the items are
children of a added/deleted or unchanged node (the latter of these is not applicable in a changes-only delta, which is used by
the combine process).
|
NoMatchingItemCombineException |
An item with an unchanged delta in the delta file means that both of the original inputs will have contained the same XML node.
|
NonMatchingDeletedDeltaCombineException |
When a delta refers to a node in the input file which is to be excluded from the result it is expected to be the same as the
same item in the delta.
|
NonMatchingExchangeItemCombineException |
When a delta includes an exchange the item in the input file that is being "exchanged" should match its item in the exchange.
|
NonMatchingPCDataCombineException |
Unchanged PCData should be the same in the input and delta files.
|
NotADeltaFileException |
A combine operation requires one of the original input files that was used in the comparison, and the changes-only delta that
was the result of the comparison.
|
OrderlessDeltaMismatchException |
In the orderless combination algorithm, all elements which are added, deleted or modified must have corresponding elements in
the non-delta input.
|
OriginalPositionAttributeMissingException |
An Element does not have an {http://www.deltaxml.com/ns/well-formed-delta-v1}:original-position attribute when one is required.
|
PropertyRejectedException |
This Exception is thrown when a comparison is started on an XMLComparator on which setProperty has been called with arguments
that are not understood by a parent
XMLReader . |
UnchangedElementHasChildrenException |
In a changes-only delta, an unchanged element should not have any child attributes or elements.
|
UnexpectedAttributeCombineException |
When the delta specifies that an attribute is added in the delta file (that is it has an added delta in a forward-combine, or a
deleted delta in a reverse-combine) the input file should not already have an attribute with the same name in the same
namespace.
|
UnexpectedDeltaAttributeException |
When inside an added or deleted sub-tree, an element should not contain a delta attribute.
|
UnexpectedDeltaFileException |
A combine can only be carried out with one of the original input files and the delta.
|
UnexpectedNewAttributesException |
In DX1, an attribute called new-attribute is used to store the deleted or, in the case of a modified attribute, the old value.
|
UnexpectedOldAttributesException |
In DX1, an attribute called old-attribute is used to store the deleted or, in the case of a modified attribute, the old value.
|
UnorderedDuplicateKeysException |
An orderless element (one with the
deltaxml:ordered='false' attribute) cannot contain more than one child element
with the same name/type (ie. |
UnorderedElementContainingPCDATAException |
The orderless comparator cannot process mixed XML content, that is an element containing child elements and PCDATA.
|
UnorderedModifiedContainsPCDATAException |
An orderless comparison cannot be performed on a node with child PCData nodes.
|
VersionLabelNotPresentInOriginalPositionException |
The value of a {http://www.deltaxml.com/ns/well-formed-delta-v1}:original-position attribute does not have a value for the
requested version label..
|
XMLCombinerConfigurationException |
This class is used to indicate a configuration error in the XMLCombiner.
|
XMLComparatorConfigurationException |
This class is used to indicate a configuration error in the XMLComparator.
|
Error | Description |
---|---|
DeltaXMLError |
This class specifies an error condition.
|
XMLCombinerFactoryConfigurationError |
This class is used to indicate an error in the configuration of a XMLCombiner factory.
|
XMLComparatorFactoryConfigurationError |
This class is used to indicate an error in the configuration of a XMLComparator factory.
|
A low-level JAXP interface for advanced users supporting comparison and recombination.
The comparison (or diff) function between two XML trees produces a delta tree which describes the differences between the two input trees. The recombination (or patch) operation can use the delta tree produced by the comparison and one of the original input files and regenerate the other input file.
NOTE: A new package: com.deltaxml.core
provides a PipelinedComparator
class which
makes the construction of XML filtering pipelines much easier. We recommend new users should consider using this package first.
This package is provided and maintained for those users who the PipelinedComparator does not provide a solution and who need
under the hood access to JAXP pipelining and also for forwards-compatibility for existing 2.x release users.
This API requires:
JAXP is required to provide a pluggable SAX Parser. The one included in the JDK will suffice, however alternative implementations including those provided in Saxon version 6, Xerces or Sun's JAXP reference implementation (also known as the crimson parser) can be used.
The software also uses the Result and Source interfaces from JAXP to specify the sinks and sources for the compare and combine
operations. These are normally part of TrAX and can be provided by including xalan.jar
from the Xalan-J version 2
release or by using jaxp.jar
from Sun's JAXP1.1 reference implementation.
Copies of saxon.jar
and xercesImpl.jar
are included with this release. They are provided for
convenience. They may be used by including them in the JVM classpath. Alternative JAXP implementations may be substituted.
A samples directory provides code samples and data together with a README file explaining compilation/running.
The most basic use of the API involves using a factory method to create a comparator or combiner object, and then invoking its compare() method:
File inA= new File("a.xml"); File inB= new File("b.xml"); File delta= new File("a-to-b.xml"); try { XMLComparator comparator= XMLComparatorFactory.newInstance().newXMLComparator(); comparator.compare(new StreamSource(inA), new StreamSource(inB), new StreamResult(delta)); } catch (DeltaXMLException dxe) { // Process exceptions. }
Properties and Features are used to configure a XMLComparator
or a
XMLCombiner
through the comparator.setProperty
,
comparator.setFeature
, combiner.setProperty
and combiner.setFeature
methods as appropriate.
The currently supported properties and features are documented in Features and Properties.
A single XMLComparator or XMLCombiner should not be used by multiple threads running concurrently. Different XMLComparators or XMLCombiners may be used concurrently by different threads.
Feature, property and error-listener settings are preserved between XMLComparator and XMLCombiner invocations. Although it is possible to use a XMLComparator or XMLCombiner multiple times, doing so will increase its memory footprint, as a certain amount of dictionary data is preserved or interned between compare or combine invocations. While there are some performance advantages in reuse scenarios, we currently recommend that XMLComparators and XMLCombiners are not used multiple times unless you understand their memory consumption characteristics. A future release may provide more control and support for different reuse scenarios.
Please visit our Support Page to find the relevant channels to use for any questions, bug-reports, suggested enhancements or any other matter related to this software.
Copyright © 2001-2018 DeltaXML Ltd. All Rights Reserved.