Re: [xml] Are there any chance to keep single quotes as attribute text boundary?



On 11/12/2010, Nikolay Shaplov <n shaplov ru> wrote:

This is not diff safely :-/

Are there any chance to keep formatting as it were, at least for
elements that were not changed during tree elements manipulation? May
be there is some parsing options I do not know of?

This kind of formatting is not in the infoset[0] so not preserved from parsing.

The general solution to your problem with text diffs is to
consistently output a canonical form[1], which will ensure the
serialised representation won't change if the stuff you care about
doesn't.

Martin


[0] What is not in the Information Set
"17. The kind of quotation marks (single or double) used to quote
attribute values."
<http://www.w3.org/TR/xml-infoset/#omitted>
[1] The libxml2 "Canonical XML" implementation
<http://xmlsoft.org/html/libxml-c14n.html>



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