commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Sell <christian.s...@netcologne.de>
Subject Re: [JXPath] evaluating expression on a given node
Date Thu, 20 Feb 2003 16:44:32 GMT
Dmitri Plotnikov wrote:
> Of course you are welcome to look at the source code.  But I would
> really appreciate it if you told me what it was that you were looking
> there for. Such feedback would allow me to improve the documentation.

Ok. My conclusion so far is that my initial idea of being able to 
determine on-the-fly (during parsing) for a given node whether it is 
covered by a xpath expression does not work. This is because the 
expression may be referencing items that come come later in the parse 
(e.g., child nodes). Therefore I have to have two passes - one to build 
the node tree, and another one to determine the target nodes for the 
xpath expressions and treat them accordingly (e.g., set color "red").

This reduces my problem to being able to work on a custom object model. 
I know JXPath supports this - but It seems that Jaxen is significantly 
easier to extend - in fact, I had to implement only one class 
(DocumentNavigator), and 2 helper classes. This also includes one 
extension function.

also, with Jaxen I was able to easily separate the core functionality 
together with my model support classes without carrying the other models 
around unnecessarily.

Conclusion: I'll probably stick with Jaxen for now - unless it 
completely breaks in the process. BTW, can you name any significant 
advantages JXPath has over Jaxen? To me they seem to be almost identical 
in function.


> 
>>>>BTW, any hints on how to build JXPath from cvs? I am getting lots
>>
>>of
>>
>>>>test failures, and maven.log is full of error messages about
>>
>>invalid
>>
>>>>uses of Jelly tags.
>>>
>>>If you are having problems with the Maven build, try the regular
>>
>>Ant build -
>>
>>>it works like a charm.
>>
>>what makes me feel uncomfortable is the test failures I see all over
>>the 
>>place:
> 
> The test failures are caused by a minor issue with Maven where in
> certain version of Maven it does not copy test resources into the
> test_classes tree properly.  In order to get the tests run with Maven I
> typically copy that resource by hand.  But like I said, the Ant build
> including the tests works just fine.
> 
> - Dmitri

hmm, I think I had the same happening with ant..

thanks,
Christian



Mime
View raw message