On Tue, Feb 08, 2005 at 11:30:44AM -0800, Aleksey Sanin wrote: > Yes. You have to add all the nodes that you want to get > canonicalized. However, in this particular case there is > a better way. The xmlC14NExecute function allows one to > provide a callback that would be called to determine if > a given node is "visible" (i.e. included in c14n output) > or not. To canonicalize just a given node (with all the > attributes and children nodes) you can write a callback > function that would return "true" for your node, its attributes, > namespaces and children nodes and "false" for all other > nodes in the document.
Aleksey, I don't know if you have followed the -slightly heated- thread about xml:id and C14N starting at http://lists.w3.org/Archives/Public/public-xml-id/2005Feb/0038.html basically the c14n spec expect propagation if all xml:* attributes while it is an error to propagate those for xml:base and possibly for xml:id. It seems to me this is the code in c14n.c after line 982. I'm of the opinion that the C14N spec is broken in that it was assuming cascading behaviour for all xml:* attributes and while this is true for xml:space and xml:lang it is not true for new attributes like xml:base and xml:id. As an implementor what do you think ? My take is that the c14n spec and the code need fixing, but I would not go forward without your input, (it's your code :-), and can potentially generate some interop problems for documents using xml:base and xml:id, which may raise bug reports on your side. No need to rush but it's a problem, Daniel -- Daniel Veillard | Red Hat Desktop team http://redhat.com/ [EMAIL PROTECTED] | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ _______________________________________________ xml mailing list, project page http://xmlsoft.org/ [email protected] http://mail.gnome.org/mailman/listinfo/xml
