From: Eric B. <er...@go...> - 2007-12-26 14:27:46
|
Colin Paul Adams wrote: > I still don't see why inheriting from KL_PART_COMPARATOR would make a > difference. > Anyway, XM_XPATH_ATOMIC_COMPARER needs to inherit from KL_COMPARATOR > as less_equal is used elsewhere (XM_XPATH_MINIMAX_ROUTINES). KL_PART_COMPARATOR also provides `less_than'. But there is no such assumption as: not (a < b) and not (b < a) implies a equal b. So, when not comparable, instead of raising an exception you can just return false. If your items are not all comparable, then KL_COMPARATOR is not the right abstraction (you don't have a total order relation). -- Eric Bezault mailto:er...@go... http://www.gobosoft.com |