Thursday, June 08, 2006

XML canonicaliser

-----Original Message-----
From: owner-xml@lists.hl7.org [mailto:owner-xml@lists.hl7.org] On Behalf Of
Patrick McCormick
Sent: Wednesday, June 07, 2006 3:02 PM
To: Smithies Rik
Cc: charlie@ramseysystems.co.uk; xml@lists.hl7.org
Subject: Re: Canonicalizer ?

Hi,

libxml's xmllint (http://www.libxml.org/) can handle this with the "--c14n"
option. Here's a test I threw together that shows it generating the same
output from two similar but not identical XML files:

[~]$ cat bad.xml
<some><tag quux="baz" foo="bar"/></some> [~]$ cat bad2.xml <some><tag
foo="bar" quux="baz"></tag></some> [~]$ xmllint --c14n bad.xml <some><tag
foo="bar" quux="baz"></tag></some> [~]$ xmllint --c14n bad2.xml <some><tag
foo="bar" quux="baz"></tag></some>

Libxml implements the W3C's Canonical XML recommendation.

I have it as part of Cygwin (http://www.cygwin.com/) but you can download
native win32 libraries here:

http://www.zlatkovic.com/pub/libxml/

Get "libxml2-...zip" and "iconv-...zip". Unpack libxml2, then copy the
iconv.dll file from the iconv zip to the "bin" directory where xmllint.exe
is. That's all you need to run xmllint.

I should mention how great Cygwin is -- it's big, but you end up with nearly
every open source program you could ever need sitting on your hard drive,
ready to run from a shell window.

best,
patrick

--
Patrick McCormick
Columbia University College of Physicians & Surgeons Class of 2008
pjm2109@columbia.edu

Smithies Rik wrote:
> Thanks Charlie, that's the only one I could find and the download page
> isn't there any more.
> Rik
>
>> -----Original Message-----
>> From: Charlie McCay [mailto:Charlie@ramseysystems.co.uk]
>> Sent: 07 June 2006 12:25
>> To: Smithies Rik; xml@lists.hl7.org
>> Subject: RE: Canonicalizer ?
>>
>> Rik
>> I have used www.elcel.com/products/xmltools/xmlcanon.html in
>> the past -- but am having web access problems that the moment
>> so cannot confirm that it is still there and working All the
>> best Charlie
>>
>>
>> Charlie McCay, charlie@RamseySystems.co.uk Ramsey Systems
>> Ltd, 23D Dogpole, Shrewsbury, Shropshire SY1 1ES
>>
>> tel 01743 232278 / 07808 570172 skype: charliemccay
>>
>>
>>
>>
>>> -----Original Message-----
>>> From: owner-xml@lists.hl7.org
>>> [mailto:owner-xml@lists.hl7.org] On Behalf Of Smithies Rik
>>> Sent: 07 June 2006 12:19
>>> To: xml@lists.hl7.org
>>> Subject: Canonicalizer ?
>>>
>>> Does anyone know of a free XML canonicalizer that can be
>> used from a
>>> command line (windows) ?
>>> I know some APIs support it, but I'm looking for something canned.
>>> thanks,
>>> Rik
>>>
>>> This e-mail is confidential and privileged. If you are not the
>>> intended recipient please accept our apologies; please do not
>>> disclose, copy or distribute information in this e-mail or take any
>>> action in reliance on its contents: to do so is strictly prohibited
>>> and may be unlawful. Please inform us that this message has gone
>>> astray before deleting it. Thank you for your co-operation.
>>>
>>>
>>>
>>> ************************************************
>>> You are currently subscribed to xml@lists.hl7.org as
>>> charlie@ramseysystems.co.uk To unsubscribe from this list,
>>> send a blank email to leave-xml-164023L@lists.hl7.org To
>>> access the Archives of this list, go to:
>>> http://lists.hl7.org/read/?forum=xml
>>> To access your List Server profile and subscriptions, go to:
>>> http://%%site.domainname%%/read/login
>>>
>>>
>
> ************************************************
> You are currently subscribed to xml@lists.hl7.org as pjm2109@columbia.edu
> To unsubscribe from this list, send a blank email to
leave-xml-164023L@lists.hl7.org
> To access the Archives of this list, go to:
http://lists.hl7.org/read/?forum=xml
> To access your List Server profile and subscriptions, go to:
http://%%site.domainname%%/read/login
>

************************************************
You are currently subscribed to xml@lists.hl7.org as hl7@cripps.net
To unsubscribe from this list, send a blank email to
leave-xml-164023L@lists.hl7.org
To access the Archives of this list, go to:
http://lists.hl7.org/read/?forum=xml
To access your List Server profile and subscriptions, go to:
http://lists.hl7.org/read/login


Comments: Post a Comment



<< Home

This page is powered by Blogger. Isn't yours?