OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: [xml-dev] Canonical XML

[ Lists Home | Date Index | Thread Index ]

I still use a slightly adapted version of James Clark's XMLTest:

http://www.jclark.com/xml/XMLTest.java

It outputs James' version of Canonical XML rather than the official version,
but this is fine for comparing two documents. (When James says his code
isn't written with performance in mind, he means it only runs twice as fast
as other people's, not ten times as fast. Remember that he's English.)

In another test suite I use the XPath 2.0 deep-equals() function.

What neither of these do is tell you where the differences are: they just
return a boolean yes/no answer.

Michael Kay
http://www.saxonica.com/


> -----Original Message-----
> From: Fraser Goffin [mailto:goffinf@hotmail.com] 
> Sent: 22 October 2005 19:45
> To: xml-dev@lists.xml.org
> Subject: [xml-dev] Canonical XML
> 
> Does anyone know of a good implementation for producing 
> canonical XML (as 
> per W3C spec) ?
> 
> Basically I need to be able to compare to XML instances and 
> be able to 
> determine any differences that may be significant from a business 
> stand-point. That is this difference is *NOT* significant 
> <node></node> vs. 
> <node/>, but this might be <sumInsured>1000</sumInsured> vs. 
> <sumInsured>1000000</sumInsured>. So I need to be able to find any 
> differences then execute rules to determine whether the 
> differences are of 
> interest.
> 
> I had thought about running each instance through a 
> canonicalisation process 
> similar to what might be required in dig sig checking and 
> then comparing the 
> results ??
> 
> In my case, one instance document will be coming in on an 
> inbound HTTP 
> request and the second I will drag out of a state store. The 
> point here is I 
> need something I can integrate into my processing rather than 
> just a file 
> based or command line utility.
> 
> The programatic environment is predominatly Java based, and 
> needs to run on 
> a variety of platforms. It may be that more than one 
> technology will be 
> needed for each aspect (compare, rules).
> 
> Appreciate any guidance
> 
> Fraser.
> 
> 
> 
> -----------------------------------------------------------------
> The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
> initiative of OASIS <http://www.oasis-open.org>
> 
> The list archives are at http://lists.xml.org/archives/xml-dev/
> 
> To subscribe or unsubscribe from this list use the subscription
> manager: <http://www.oasis-open.org/mlmanage/index.php>
> 
> 



  • References:



 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS