Warning, I've swerved dangerously off topic...

----- Original Message -----
From: "David Peterson" <[EMAIL PROTECTED]>
> On Thu, 2002-03-21 at 09:25, James Strachan wrote:
> > ----- Original Message -----
> > From: "bob mcwhirter" <[EMAIL PROTECTED]>
> >
> > Though I do like the idea of a generic XPath object too. The use case is
> > JSTL (the JSP Standard Tag Library) which has a bunch of XPath related
tags
> > which are based on XPath. It would be really cool to have a flexible
XPath
> > implementation that could autodetect whether a JSP user was working with
> > DOM, dom4j, EXML, JDOM et al - provided the performance overhead is
pretty
> > minimal.
>
> That's a good example. I knew there was some reason this came up before
> :) There are still going to be issues with actually using the results of
> the XPath once it is returned, though. Though from memory, with the
> JSTL, the result would just be used as a JavaBean, using other tags (eg
> <jx:getProperty ...> etc).

Actually it turns out that most of the time the JSTL XML tags are used you
never actually see the object model - the tags mostly avoid needing to
actually use it explicitly. Of course a developer may wish to use parts of
the model or result nodes or whatnot - but typically the model is mostly
invisible - they are all just sources of XML. Its a little like XSLT - you
don't use any DOM APIs in a typical XSLT stylesheet.

I'm actually quite proud of the XML tags in JSTL - they are pretty much the
core tags from XTags which have been improved somewhat thanks to the efforts
of the expert group (though unfortunately they've lost a little of their
XSLT flavour to be a bit more JSTL-like).

http://jakarta.apache.org/taglibs/doc/xtags-doc/intro.html

Maybe one day a minimal XML tree could be implemented thats only purpose in
life is to store XML in a fast & efficient form and that is easy and fast to
evaluate XPaths on as possible - then the JSTL tags could use that instead.
i.e. that if you only want XPath and don't want a cross-language API like
DOM or a nice API like dom4j or a simple API like JDOM :-) then there could
be a better, faster implementation. Especially if the model is read-only.
e.g. Attributes could be implemented as an array. Michael Kay has done some
good work in this area in Saxon, we could do something similar one day in
Jaxen too.

James


_______________________________________________
Jaxen-interest mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jaxen-interest

Reply via email to