[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Schema based XML compare

  • From: "Kiel, Paul (LNG-RDU)" <Paul.kiel@lexisnexis.com>
  • To: David Lee <dlee@calldei.com>, "xml-dev@l..."<xml-dev@l...>
  • Date: Thu, 23 Dec 2010 14:29:46 +0000

RE:  Schema based XML compare

Hi David,


As someone who has been working with large libraries of schemas for many years, this tool would be *wonderful*.  I tried down this path myself but there weren’t enough hours in the night.  “Shouldn’t be too hard” must mean you have smaller ambitions that I had wanted.  I knew it would be hard, or at least time consuming maybe is more accurate.

A data model diff would be very useful for doing things like evaluating backward compatibility of libraries of schemas as well as provide some educational material to implementers who need to see how the model has changed since the last release. 


If you find this animal, please do let me know.  If you want to talk offline, I’d be happy to compare notes.


-- Paul



W. Paul Kiel


Consulting Content Engineer

LexisNexis, Global Content Architecture





From: David Lee [mailto:dlee@c...]
Sent: Thursday, December 23, 2010 7:29 AM
To: xml-dev@l...
Subject: Schema based XML compare


I've run into an age-old issue but I don’t see any off-the-shelf solutions for.


Suppose I have 2 XML documents I want to compare (not diff, just give me yes/no are they equivalent).

This is pretty simple to do even with things like ignoring whitespace options etc.  Many tools out there, including one I wrote

( http://www.xmlsh.org/CommandXcmp)


Now here's the twist …


Suppose I want to compare for XSD  data model equivalence, not XDM  equivalence ?








Without type annotation these are different.
But if I declare the type for number to  be xs:double

they should compare equal.


Thus a compare tool should be able to be given a schema and do a comparison and report that these 2 documents are equivalent at the XSD data model level.


Has anyone seen anything like this ?

Would anyone have a use for it ? (I may end up writing it for my own uses).


Not sure how far one can take this before entering murky waters …

Even in the numeric cases there are edge cases where comparisons are not well defined (rounding/precision issues on floating point numbers).

Then add in things like date/times …

But suppose I'm willing to avoid the murky edges and just stick to the obvious cases … shouldn’t be too hard right ?
In fact I suspect its so obvious its been done but I can't find one anywhere.










David A. Lee




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.

Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.