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. Advertisements

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:
    29,129
    Moody
    Jul 17, 2003
  2. cvissy
    Replies:
    0
    Views:
    838
    cvissy
    Nov 16, 2004
  3. Soren Kuula
    Replies:
    2
    Views:
    710
    Malcolm Dew-Jones
    Apr 13, 2005
  4. Maitre Bart
    Replies:
    0
    Views:
    554
    Maitre Bart
    Oct 22, 2004
  5. Replies:
    0
    Views:
    408
  6. Trent Buck

    CPP predicates for compiler extensions

    Trent Buck, Nov 8, 2004, in forum: C Programming
    Replies:
    1
    Views:
    494
    Mark A. Odell
    Nov 8, 2004
  7. Gaijinco

    How predicates are evaluated

    Gaijinco, Mar 8, 2006, in forum: C++
    Replies:
    1
    Views:
    356
    Dietmar Kuehl
    Mar 8, 2006
  8. Altu
    Replies:
    9
    Views:
    656
    Peter Flynn
    Oct 7, 2007
Loading...