RE: [F&O] deep-equal

> > Thanks!  We are going to give it another try!
> 
> I think that the language would be better without this in the 
> core, and users would benefit from being given a complete 
> definition in the appendix that they could tune to their own 
> needs, however in either case, I think that if you want to 
> ignore comments the rule should be for elements, if it has no 
> element children, compare the _string value_ this will get 
> rid of the anomalous text node slitting due to comments and pis.
> 

Thanks for your observation about the fact that we aren't ignoring the
existence of comments and PIs. Solving this isn't easy.

If there are no element children, comparing the typed value makes sense. But
mixed content is tricky. We could specify in prose that comments and PIs are
(completely) ignored, but it's not so easy to specify in XPath code. (It
could be done in XQuery or XSLT by constructing  new trees with the comments
and PIs removed, and then comparing the new trees).

I also think we should ignore whitespace-only text nodes in element-only
content.

Michael Kay

Received on Thursday, 4 December 2003 04:56:18 UTC