[jdom-interest] deep equals

Elliotte Harold elharo at metalab.unc.edu
Sat Oct 16 05:00:15 PDT 2004


The problem with deep equals of course is that there are many different 
definitions depending on need. For instance:

1. Do you consider namespace prefixes?
2. Do you consider namespaces in scope?
3. Do you consider xml:lang and xml:space positions?
4. Do you consider base URIs, and just how do you handle xml:base
5. Do you normalize text in Unicode fashion before comparing?
6. Do you combine adjacent text nodes.

Depending on context, you could go either way on any of these questions. 
It's not clear that any one definition really satisfies all needs.

-- 
Elliotte Rusty Harold  elharo at metalab.unc.edu
XML in a Nutshell 3rd Edition Just Published!
http://www.cafeconleche.org/books/xian3/
http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/ref=nosim


More information about the jdom-interest mailing list