[jdom-interest] Addition method in org.jdom.xpath.XPath that would be useful

bob mcwhirter bob at werken.com
Wed Mar 5 06:44:14 PST 2003


On Wed, 5 Mar 2003, Brynjar Glesnes wrote:

> I am very pleased with the added XPath support found in JDOM. There is
> however an addition method that I would find very useful. This is the
> possibility to detect if a "compiled" XPath is a location path.
> 
> Is this of any general interest? Is it possible to add this functionality to
> the JDOM project?

Brynjar,

First, we'd need to expose that functionality in Jaxen itself.  It
should be trivial, involving maybe just an instanceof check on the
top of the syntax tree.  But not currently possible.

I'm trying to get geared up for a 1.1 release of Jaxen, and need
interested folks who want to apply patches, verify changes, etc.

I'm currently witnessing the jaxen-jdom tests failing due to an
out-of-memory error while running the tests.  All of the other
models work, so I haven't figured out what the difference is yet.
I think I may be suffering from the StringBuffer bug.

Anyhow, I'm +1 on this idea from the jaxen end of things, as
the current way of doing things do seem to require a significant
amount of priori knowledge about the path.

Also, I think we need to expose just a bare evaluate(...) method
so that you get the actual unmolested value of the expression
as evaluated, which might be a List of numbers, elements, booleans,
etc.  I think right now selectNodes(...) acts as evaluate(...)
should, but it's strangely named for something that can also
just evaluate an arithmetic expression.

So, if you're interested in helping jaxen (and thus JDOM), pop over to
http://lists.werken.com/ and subscribe to the jaxen-interest list.

	-bob




More information about the jdom-interest mailing list