Re: [xml] Add new pretty-printing and sorting options for saving XML

On Thu, Oct 07, 2010 at 09:05:46AM -0000, Adam Spragg wrote:
On 05/10/2010, Adam Spragg <adam spra gg> wrote:
The idea of these options is to be able to combine them to produce a
"canonical", nearly line-oriented format for XML files.

Are you familiar with the "Canonical XML" W3C Recommendation and its
implementation in libxml2?
The idea seems reasonable, but I don't know if adding code to libxml2
is the right first step. It's a core library people are rightly
nervous about updating, and with only an implementation and no spec to
go off,

Hmmm....if I redid the "sort" part of the patch to stand completely on its
own, rename the option to XML_SAVE_CANONICAL, and used it to implement the
"Canonical XML" spec instead, would that likely be more acceptable?

I could do a respin of the in-tag pretty-printing patch afterward if
anyone thought it was still worth discussing/speccing.

  Actually I went though your patches now,
So I think this new formatting is an interesting addition since it's
garanteed to be non-destructive, but reimplementing/reinventing the
C14N spec doesn't sound so good (unless it comes as a patch reusing the
existing c14n code).
  So I did apply and commit the first 3 patches nearly as is, adding the
new xmllint option. IMHO there isn't really a need at the xmllint level
for the following since --c14n just implement the spec. At the API level
c14n really comes as a separate module.


Daniel Veillard      | libxml Gnome XML XSLT toolkit
daniel veillard com  | Rpmfind RPM search engine | virtualization library

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