Hi Vivek, Vivek Pandey wrote: > I have started implementation work of DOM L3 XPATH 1.0 > in my xerces 2.1 workspace.
To my knowledge Xalan already implements this API. So I am wondering if we should implement it in Xerces...? > * All xpath interfaces as defined by w3c are included in > src/dom3/org/w3c/dom/xpath. You will need to define a new build target, i.e. "xpath-dom3". For PSVI for example we've created new PSVIDocumentImpl and events/ranges/traversal is part of DocumentImpl. > * The xpath implementation classes will be located at: > src/org/apache/xerces/dom/xpath. Not sure we need this new package. The reason that most DOM is in one package is because we needed to access protected variables /methods or the ones that have default accessibility. So maybe it makes sense to put it to *dom* package. > * XPathEvaluator implementation will be in a separate class and will not > be implemented by w3c Document implementation class CoreDocumentImpl. This > should be done to allow customization for custom variable and function > context. I am not sure what you mean, by definition: [[ In a DOM implementation which supports the XPath 3.0 feature, as described above, the XPathEvaluator interface will be implemented on the same object which implements the Document interface permitting it to be obtained by the usual binding-specific method such as casting or by using the DOM Level 3 getInterface method ]] Do you want to extend CoreDocumentImpl and make that class implement XpathEvaluator? If yes, then CoreDOMImplementationImpl.has feature should recognize "XPath": > * CoreDOMImplementationImpl.hasFeature modified to include "XPATH", "3.0". Instead, you should create XPathDOMImplementationImpl. See how we handle PSVI in DOM or events/ranges/traversal. > * XPathResult > With XPATH 2.0 the evaluate result XPathResult object seems to be the only > class which will get impacted. Inorder to provide XPATH 2.0 support, the > result object returned by XPathEvaluatorImpl can be java.lang.Object > (inplace for XPathResult as defined in the interface). When XPATH 2.0 > result object (e.g. XPath20Result interface) is defined then it will be easier > to use the existing API. You should be able to access DOM-IG mailing list and you will find the latest XPath *editors* copy there ( Tue, 20 Aug). > * Using org.apache.xpath packe in xalan for xpath parsing. is this > ok? I am not sure what do you mean? You are implementing this code in Xerces, so how can you use the Xalan package?? When implementing new features in the Xerces DOM you should be very careful not to effect performance or memory. As a general rule you should not add ANY fields to NodeImpl. Thanks, -- Elena Litani / IBM Toronto --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
