org.apache.xpath.patterns

Class UnionPattern

public class UnionPattern extends Expression

This class represents a union pattern, which can have multiple individual StepPattern patterns.

UNKNOWN: advanced

Method Summary
voidcallVisitors(ExpressionOwner owner, XPathVisitor visitor)
booleancanTraverseOutsideSubtree()
Tell if this expression or it's subexpressions can traverse outside the current subtree.
booleandeepEquals(Expression expr)
XObjectexecute(XPathContext xctxt)
Test a node to see if it matches any of the patterns in the union.
voidfixupVariables(Vector vars, int globalsSize)
No arguments to process, so this does nothing.
StepPattern[]getPatterns()
Get the contained step patterns to be tested.
voidsetPatterns(StepPattern[] patterns)
Set the contained step patterns to be tested.

Method Detail

callVisitors

public void callVisitors(ExpressionOwner owner, XPathVisitor visitor)

See Also: XPathVisitable

canTraverseOutsideSubtree

public boolean canTraverseOutsideSubtree()
Tell if this expression or it's subexpressions can traverse outside the current subtree.

Returns: true if traversal outside the context node's subtree can occur.

deepEquals

public boolean deepEquals(Expression expr)

See Also: deepEquals

execute

public XObject execute(XPathContext xctxt)
Test a node to see if it matches any of the patterns in the union.

Parameters: xctxt XPath runtime context.

Returns: SCORE_NODETEST, SCORE_NONE, SCORE_NSWILD, SCORE_QNAME, or SCORE_OTHER.

Throws: javax.xml.transform.TransformerException

fixupVariables

public void fixupVariables(Vector vars, int globalsSize)
No arguments to process, so this does nothing.

getPatterns

public StepPattern[] getPatterns()
Get the contained step patterns to be tested.

Returns: an array of the contained step patterns to be tested.

setPatterns

public void setPatterns(StepPattern[] patterns)
Set the contained step patterns to be tested.

Parameters: patterns the contained step patterns to be tested.

Copyright B) 2006 Apache XML Project. All Rights Reserved.