> On connonical forms, would it be possible to express a fragment, say an
element and everything under it? This would facilitate
> signing part
> of a document and putting the signature back into the same document.
The current NodeComparator can handle any node, fragment or entire document
you give it. So its great for comparing fragments.
But its not doing a canonical comparison, it does an exact value comparison.
So adding (say) any ignoreable whitespace and the documents aren't equal any
more.
I added a JUnit test case to try testing some round trips from text <->
dom4j <-> SAX <-> DOM and back again. Its here if anyones interested:-
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/dom4j/dom4j/src/test/org/dom4
j/TestRoundTrip.java?rev=1.1&content-type=text/vnd.viewcvs-markup
Unfortunately for testing document equality when round tripping through
various SAX & DOM parsers & engines the documents rarely ever are 'exactly
equal' so being able to do canonical comparisons of Nodes, Elements,
Documents and fragments would be really useful.
I'll add it to the to do list, the creation of a new CanonicalNodeComparator
implementation.
> Frankly, I don't see how P2P can get very far without something like this.
Agreed. The more I think about it the more useful a CanonicalNodeComparator
seems.
Hey Toby, fancy having a go at implementating the CanonicalNodeComparator?
;-)
James
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
_______________________________________________
dom4j-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dom4j-user