GNOME Bugzilla – Bug 143226
canonical XML from xmllint/xsltproc (feature request)
Last modified: 2009-08-15 18:40:50 UTC
Feature request: It is nice to have an option for xmllint (maybe also for xsltproc) to output canonical XML. In case of comments I suggest to post them also to a discussion list: http://mail.gnome.org/archives/xml/2004-May/msg00195.html Thank you
Could be an option for the new saving APIs. Now which canonical XML do you suggest ? There is already support in libxml2 for W3C canonicalization (see c14n.h), check on the list, aleksey the implementor of the c14n module certainly have an idea about this. Daniel
I suggest W3C canonicalization. Thank you for information, I'll write a letter to Aleksey Sanin with an ask to comment this issue.
Yes, it is a good idea. However, you need to remember that c14n is usually used with XPath expressions.
adding myself to cc list
Okay I added a --c14n option to xmllint providing canonicalization (with comments) of the result of parsing. It sort and simple. On the other hand I'm vary of doing that for xsltproc as generating the output is a stylehseet dependant operation, and mixing both gets messy. You can still do xsltproc ... | xmllint --c14n - if needed. It's commited in CVS, Daniel
Thank you a lot. > You can still do xsltproc ... | xmllint --c14n - if needed. Not a problem.