Posted 16 October 2013
by Phil G. Fearon

Share this blog:

Read more in Document Management

Comparing XQuery with DeltaXignia Core

Typically, the  DeltaXignia Core  product is used to compare XML content, but have you ever considered using the Core product to compare non-XML documents? In this blog post, I experiment with using Core to compare (non-XML) XQuery code.

The objective here is to use a DXP  Pipeline Configuration  file to define a pipeline for the Core comparator. Two simple XSLT filters are to be used, one for input, the other for output. The input filter converts XQuery to XML with one element for each token, it exploits an imported tokenizer function for XQuery – from the open source  XMLSpectrum  project (for which I’m currently the sole contributor).

A high-level view of the XQuery pipeline I developed is shown below:


A view of the configured pipeline

Running the XQuery comparison

For this experiment I’m using the Java version of Core and invoking the comparison from an Ant build file. Within this, the run target invokes the DeltaXignia command.jar with 5 command-line arguments:

  1. compare The Core method to invoke
  2. xquery The id attribute of the Pipeline Configuration file
  3. input-file1.xml Input XML file 1 – holds the URI of the 1st XQuery file to compare
  4. input-file2.xml Input XML file 2 – holds the URI of the 2nd XQuery file to compare
  5. result.html The destination file

© 2000-2025 DeltaXML Ltd. registered in England and Wales (Company No. 2528681), trading as DeltaXignia. All rights reserved