[XML-DEV Mailing List Archive Home]
[Reply To This Message]
RE: Schema based XML compare
- From: "David Lee" <email@example.com>
- To: "'Michael Kay'" <firstname.lastname@example.org>, <xml-dev@l...>
- Date: Thu, 23 Dec 2010 12:21:22 -0500
I was thinking about this, does it require a schema-aware parser (say Saxon PE) ?
I would presume so.
David A. Lee
From: Michael Kay [mailto:mike@s...]
Sent: Thursday, December 23, 2010 11:50 AM
Subject: Re: Schema based XML compare
On 23/12/2010 12:29, David Lee wrote:
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
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.
The XPath 2.0 deep-equal() function appears to do what you want here: it compares the typed values of the elements rather than their string values.
| [Thread Prev]
| [Thread Next]
| [Date Next]
| [Thread Index]
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format
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