newbie question: predicates in xalan java

A

Alfraed

Hi,

I would like to do the following

NodeSet evaluate(String[] predicates, String expression, Node
contextNode)

The method above must evaluate the given expression of the contextNode
the resultset must contain nodes that satisfy the predicates. In other
words I would like the nodes retured by expression but satisfying the
predicates given.
An exmaple is

<books>
<book price="5"/>
<book price="10"/>
<book price="20"/>
</books>


The predicate could be 'price should be smaller or equal to 10' (of
course expressed in XPath notation) and the expression could be 'give
me the books element'

The result must therefore be

<books>
<book price="5"/>
<book price="10"/>
</books>

Can someone tell me how this could be implemented using Java and Xalan
Xpath?
(replies via e-mail are also welcome)

Thanks

Alfraed
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,074
Latest member
StanleyFra

Latest Threads

Top