Hi Elina,

On Wed, 18 Sep 2002, Elena Litani wrote:

> 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...?

I found XPath API in xalan but they are not DOM L3 XPath API or may be i
missed them. I also saw the code of xalan3 at
org.apache.xerces.xpath.parser. They are XPath parser and provide XPath
API which works with DTM (not DOM).

IMO, there should be DOM L3 XPath API implementation as part of
xerces which will allow applications dealing with DOM tree manipulation
and xerces, do xpath query using DOM L3 XPath API.

>
> > * 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.
>

ok. I will take a look at PSVI implementation.

> > * 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.
>

ok.

>
> > * 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?
>

Yes. Thats what I meant by my above statement, sorry it was not obvious
from that.

> 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.
>

ok. I will have a look at it.

>
> > * 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).
>

ok.

>
> > * 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??
>

The package org.apache.xpath.parser, looks generic xpath parser, please
correct me if i am worng. I think it should be more appropriate to keep it
in xml-commons.

Other approach will be to write xpath parser in xerces and DOM L3 Xpath
uses it to query the DOM.

> 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.
>

ok. I have started and till now dont see need to make any changes
NodeImpl. I will keep posting my codes and changes for your feedback.

I understand, I will be sending all the new/modified code as zip file,
right? I am following java coding conventions, is there something I should
know specific to xerces as far as coding conventions goes?

thanks,

-vivek.

> Thanks,
> --
> Elena Litani / IBM Toronto
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

--
Vivek Pandey
XML & Webservices
Sun Microsystems, Inc.






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to