[xml] xml diff and patch support -- new node type
- From: Mark Vakoc <thevakoc-xml yahoo com>
- To: xml gnome org
- Subject: [xml] xml diff and patch support -- new node type
- Date: Mon, 31 Jan 2005 16:55:25 -0800 (PST)
Daniel,
I'm midway through implementing what I hope to be a rather flexible diff (and
eventually patch) implementation for libxml2. Flexible in the sense that it
should be able to output different output formats though I will likely only be
implementing one (probably the microsoft XmlDiffPatch diffgram format).
Couple of general things about it:
* the diff API will only take URIs rather than xmlDocPtr's because it is
destructive to the documents and also requires access to all fields to store
hashes, relative positions, misc items (including _private) for the source and
target document
* I'm adding a xmlHashMultiTable that is a hash multimap where the sort key
need not be unique. It is also implemented to allow front and back access to
entries when duplicate entries exist (making easy FIFO or FILO access). In
addition the user is responsible for computing the hash key (it accepts an
unsigned long to add/lookup functions)
* I really need to add another node type to XML_ELEMENT_TYPE for a condensed
node, that is a representation of subtrees and/or sequences (adjacent siblings)
that are identical between the source and target diff documents. It can follow
the same rules as XML_ELEMENT_NODE for deallocation.
Just a heads up and want to make sure adding a new value to the xmlElementType
enum is ok before I commit to that. Should have a patch ready in a week or
two.
mark
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]