edu.upenn.cis.ptb.xpath
Class SubtreeFunction

java.lang.Object
  extended byedu.upenn.cis.ptb.xpath.SubtreeFunction
All Implemented Interfaces:
org.jaxen.Function

public class SubtreeFunction
extends java.lang.Object
implements org.jaxen.Function

Functional definition of the Subtree Scoping operation in LPath.. This function has the signature:

  node-set subtree(node-set, string)
 
The second argument is a string which should be a valid XPath expression. This expression will be run against each element in the nodeset, pretending as if the tree is rooted at that element. Achieves the subtree scoping effect of LPath (Bird et al). For example:
  subtree(>>=::VP, '>::VB/-->::NN')
 
Within a VP with a VB child, select all the NN nodes which follow this VB. See the PTBXPath class for how to make recursive calls.

Author:
nikhild
See Also:
PTBXPath

Constructor Summary
SubtreeFunction()
          Creates a new instance of SubtreeScoping
 
Method Summary
 java.lang.Object call(org.jaxen.Context context, java.util.List list)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubtreeFunction

public SubtreeFunction()
Creates a new instance of SubtreeScoping

Method Detail

call

public java.lang.Object call(org.jaxen.Context context,
                             java.util.List list)
                      throws org.jaxen.FunctionCallException
Specified by:
call in interface org.jaxen.Function
Throws:
org.jaxen.FunctionCallException