[XML-SIG] Proposed XPath API

Dieter Maurer dieter@handshake.de
Sun, 16 Jul 2000 18:54:53 +0200 (CEST)


Paul Prescod writes:
 > Mike Olson wrote:
 > > 
 > >...
 > >
 > > I think these will have to be 2 different objects.  In XPath the
 > > difference is Path vs expression.  Its a matter of where you start in
 > > the EBNF.  
 > >
 > > A path is used to select, and an expression is used to
 > > match.
 > 
 > Does it require two APIs, though? You can compile anything as an
 > expression, right? So let's say you do that. Then you could throw an
 > exception in select() if the expression doesn't return a nodelist. Or
 > else you could just return the evaluated result and not worry about it.
Evaluating for a boolean rather than a node list may make a big
efficiency gain.


Dieter