org.apache.xpath.patterns
Class  AncestorStepPattern
java.lang.Object
  |
  +--org.apache.xpath.Expression
        |
        +--org.apache.xpath.patterns.NodeTest
              |
              +--org.apache.xpath.patterns.StepPattern
                    |
                    +--org.apache.xpath.patterns.AncestorStepPattern
- public class AncestorStepPattern
- extends StepPattern
  
**For advanced use only** 
 Implements a match pattern step that tests an ancestor.
- See Also: 
 - Serialized Form
 
 
| 
Constructor Summary | 
AncestorStepPattern(int whatToShow)
 
          Construct an AncestorStepPattern that doesn't test for node names. | 
AncestorStepPattern(int whatToShow,
                    java.lang.String namespace,
                    java.lang.String name)
 
          Construct an AncestorStepPattern that tests for namespaces and node names. | 
 
 
| Methods inherited from class org.apache.xpath.patterns.StepPattern | 
calcTargetString, 
canTraverseOutsideSubtree, 
executeStep, 
getLastPos, 
getMatchScore, 
getPredicate, 
getPredicateCount, 
getProximityPosition, 
getTargetString, 
setPredicates, 
setRelativePathPattern | 
 
 
 
| Methods inherited from class java.lang.Object | 
equals, 
getClass, 
hashCode, 
notify, 
notifyAll, 
toString, 
wait, 
wait, 
wait | 
 
AncestorStepPattern
public AncestorStepPattern(int whatToShow,
                           java.lang.String namespace,
                           java.lang.String name)
- Construct an AncestorStepPattern that tests for namespaces and node names.
- Parameters:
 whatToShow - Bit set defined mainly by NodeFilter.namespace - The namespace to be tested.name - The local name to be tested.
 
 
AncestorStepPattern
public AncestorStepPattern(int whatToShow)
- Construct an AncestorStepPattern that doesn't test for node names.
- Parameters:
 whatToShow - Bit set defined mainly by NodeFilter.
 
 
execute
public XObject execute(XPathContext xctxt)
                throws TransformerException
- Overide the super method so that we can handle
 match patterns starting with a function such as id()/
- Parameters:
 xctxt - XPath runtime context.- Returns:
 NodeTest.SCORE_NODETEST, 
         NodeTest.SCORE_NONE, 
         NodeTest.SCORE_NSWILD, 
         NodeTest.SCORE_QNAME, or
         NodeTest.SCORE_OTHER.- Throws:
 - TransformerException -  
 - Overrides:
 - execute in class StepPattern
 
 
 
executeRelativePathPattern
public XObject executeRelativePathPattern(XPathContext xctxt)
                                   throws TransformerException
- Execute the match pattern step relative to another step.
- Parameters:
 xctxt - The XPath runtime context.- Returns:
 NodeTest.SCORE_NODETEST, 
         NodeTest.SCORE_NONE, 
         NodeTest.SCORE_NSWILD, 
         NodeTest.SCORE_QNAME, or
         NodeTest.SCORE_OTHER.- Throws:
 - TransformerException -  
 - Overrides:
 - executeRelativePathPattern in class StepPattern
 
 
 
Copyright © 2000 Apache XML Project. All Rights Reserved.