Re: [xml] c14n: "xmlns:xml" is removed



Hi Aleksey,

Aleksey Sanin wrote:
1) If you had xmlns:xml in the output then you did not hash "c14n
result" :) c14n spec has nothing to do with what you did hash.

well, I was hashing the result of the Python-Call "doc.c14nMemory" with
"doc" being an instance of "xmlDoc" so I thought it was the c14n of the
document...  With libxml2 2.6.9 this result contained the "xmlns:xml"
attribute.  As stated in my first mail, "testC14N" of libxml2 2.6.9 also
returned the "xmlns:xml" attribute - there might have been a bug in libxml2
2.6.9 that as been fixed recently.

2) There is no easy way to add xmlns:xml to the c14n output produced
by libxml2. However, you can go ahead and hack libxml2 sources
and then it will produce what you want. But it will not be c14n and
you might have big problems with compatibility in the future.

I already figured out how to deal with my old data and my code works
with the new versions of libxml2 (without hacking libxml2!).  All new
checksums will be generated from the correct c14n data, so I hope there
will be no problems in the future.

Greetings,
  Joachim

-- 
Joachim Bauch, struktur AG
Download icoya OpenContent GPL for FREE!       visit http://dl.struktur.de/ <-

Attachment: signature.asc
Description: OpenPGP digital signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]