> In XPathResult.getInvalidIteratorState() implementation, its assuming 
the
> doc being event target. but it may not be necessary as per DOM L3 XPATH
> interface DOM L2 Core is the only mandatory requirement for DOM XPATH
> implementation. So what would be other way to find out if the document 
is
> modified to mark the iterator state invalid?

Saying that L2 Core is the only mandatory DOM requirement only means that 
it is the only requirement which must be exposed to the user. 

Other dependencies may exist -- and generally will, since as you point out 
the DOM XPath API must be able to track DOM mutation and invalidate its 
iterators. Exactly how that's done is entirely up to the implementation. 
The "other way" would be to use something unique to that particular DOM 
implementation, such as the lightweight "version count" mechanism 
currently used in the Xerces DOM to invalidate NamedNodeMaps.

> what does the community feels about DOM L3 XPATH being in xerces or in
> xalan or both.

Two different cases, not in conflict with each other. The version in Xalan 
is intended to be generic and to run against *any* Level 2 DOM -- but that 
generality may make it less efficient than one built directly into the 
Xerces DOM would be, and does mean the process of initially obtaining the 
objects is a bit different.

There's nothing wrong with implementing both. There's also also nothing 
wrong with implementing the Xerces version so it calls Xalan internally, 
if that suits your needs. (It may; it may not)

______________________________________
Joe Kesselman  / IBM Research

Reply via email to