org.apache.xpath.patterns

Class FunctionPattern

public class FunctionPattern extends StepPattern

Match pattern step that contains a function.

UNKNOWN: advanced

Constructor Summary
FunctionPattern(Expression expr, int axis, int predaxis)
Construct a FunctionPattern from a {@link org.apache.xpath.functions.Function expression}.
Method Summary
voidcalcScore()
Static calc of match score.
XObjectexecute(XPathContext xctxt, int context)
Test a node to see if it matches the given node test.
XObjectexecute(XPathContext xctxt, int context, DTM dtm, int expType)
Test a node to see if it matches the given node test.
XObjectexecute(XPathContext xctxt)
Test a node to see if it matches the given node test.
voidfixupVariables(Vector vars, int globalsSize)
This function is used to fixup variables from QNames to stack frame indexes at stylesheet build time.

Constructor Detail

FunctionPattern

public FunctionPattern(Expression expr, int axis, int predaxis)
Construct a FunctionPattern from a {@link org.apache.xpath.functions.Function expression}. NEEDSDOC @param expr

Method Detail

calcScore

public final void calcScore()
Static calc of match score.

execute

public XObject execute(XPathContext xctxt, int context)
Test a node to see if it matches the given node test.

Parameters: xctxt XPath runtime context.

Returns: {@link org.apache.xpath.patterns.NodeTest#SCORE_NODETEST}, {@link org.apache.xpath.patterns.NodeTest#SCORE_NONE}, {@link org.apache.xpath.patterns.NodeTest#SCORE_NSWILD}, {@link org.apache.xpath.patterns.NodeTest#SCORE_QNAME}, or {@link org.apache.xpath.patterns.NodeTest#SCORE_OTHER}.

Throws: javax.xml.transform.TransformerException

execute

public XObject execute(XPathContext xctxt, int context, DTM dtm, int expType)
Test a node to see if it matches the given node test.

Parameters: xctxt XPath runtime context.

Returns: {@link org.apache.xpath.patterns.NodeTest#SCORE_NODETEST}, {@link org.apache.xpath.patterns.NodeTest#SCORE_NONE}, {@link org.apache.xpath.patterns.NodeTest#SCORE_NSWILD}, {@link org.apache.xpath.patterns.NodeTest#SCORE_QNAME}, or {@link org.apache.xpath.patterns.NodeTest#SCORE_OTHER}.

Throws: javax.xml.transform.TransformerException

execute

public XObject execute(XPathContext xctxt)
Test a node to see if it matches the given node test.

Parameters: xctxt XPath runtime context.

Returns: {@link org.apache.xpath.patterns.NodeTest#SCORE_NODETEST}, {@link org.apache.xpath.patterns.NodeTest#SCORE_NONE}, {@link org.apache.xpath.patterns.NodeTest#SCORE_NSWILD}, {@link org.apache.xpath.patterns.NodeTest#SCORE_QNAME}, or {@link org.apache.xpath.patterns.NodeTest#SCORE_OTHER}.

Throws: javax.xml.transform.TransformerException

fixupVariables

public void fixupVariables(Vector vars, int globalsSize)
This function is used to fixup variables from QNames to stack frame indexes at stylesheet build time.

Parameters: vars List of QNames that correspond to variables. This list should be searched backwards for the first qualified name that corresponds to the variable reference qname. The position of the QName in the vector from the start of the vector will be its position in the stack frame (but variables above the globalsTop value will need to be offset to the current stack frame).

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