newbie question: predicates in xalan java

Discussion in 'XML' started by Alfraed, Jul 14, 2003.

  1. Alfraed

    Alfraed Guest

    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
    Alfraed, Jul 14, 2003
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Martin Buchleitner
    Replies:
    6
    Views:
    27,759
    Moody
    Jul 17, 2003
  2. cvissy
    Replies:
    0
    Views:
    603
    cvissy
    Nov 16, 2004
  3. Soren Kuula
    Replies:
    2
    Views:
    558
    Malcolm Dew-Jones
    Apr 13, 2005
  4. Maitre Bart
    Replies:
    0
    Views:
    428
    Maitre Bart
    Oct 22, 2004
  5. Altu
    Replies:
    9
    Views:
    556
    Peter Flynn
    Oct 7, 2007
Loading...

Share This Page