FunctionPatternpublic class FunctionPattern extends StepPattern Match pattern step that contains a function. |
Fields Summary |
---|
static final long | serialVersionUID | Expression | m_functionExprShould be a {@link com.sun.org.apache.xpath.internal.functions.Function expression}. |
Constructors Summary |
---|
public FunctionPattern(Expression expr, int axis, int predaxis)Construct a FunctionPattern from a
{@link com.sun.org.apache.xpath.internal.functions.Function expression}.
NEEDSDOC @param expr
super(0, null, null, axis, predaxis);
m_functionExpr = expr;
|
Methods Summary |
---|
public final void | calcScore()Static calc of match score.
m_score = SCORE_OTHER;
if (null == m_targetString)
calcTargetString();
| protected void | callSubtreeVisitors(com.sun.org.apache.xpath.internal.XPathVisitor visitor)Call the visitor for the function.
m_functionExpr.callVisitors(new FunctionOwner(), visitor);
super.callSubtreeVisitors(visitor);
| public com.sun.org.apache.xpath.internal.objects.XObject | execute(com.sun.org.apache.xpath.internal.XPathContext xctxt, int context)Test a node to see if it matches the given node test.
DTMIterator nl = m_functionExpr.asIterator(xctxt, context);
XNumber score = SCORE_NONE;
if (null != nl)
{
int n;
while (DTM.NULL != (n = nl.nextNode()))
{
score = (n == context) ? SCORE_OTHER : SCORE_NONE;
if (score == SCORE_OTHER)
{
context = n;
break;
}
}
// nl.detach();
}
nl.detach();
return score;
| public com.sun.org.apache.xpath.internal.objects.XObject | execute(com.sun.org.apache.xpath.internal.XPathContext xctxt, int context, com.sun.org.apache.xml.internal.dtm.DTM dtm, int expType)Test a node to see if it matches the given node test.
DTMIterator nl = m_functionExpr.asIterator(xctxt, context);
XNumber score = SCORE_NONE;
if (null != nl)
{
int n;
while (DTM.NULL != (n = nl.nextNode()))
{
score = (n == context) ? SCORE_OTHER : SCORE_NONE;
if (score == SCORE_OTHER)
{
context = n;
break;
}
}
nl.detach();
}
return score;
| public com.sun.org.apache.xpath.internal.objects.XObject | execute(com.sun.org.apache.xpath.internal.XPathContext xctxt)Test a node to see if it matches the given node test.
int context = xctxt.getCurrentNode();
DTMIterator nl = m_functionExpr.asIterator(xctxt, context);
XNumber score = SCORE_NONE;
if (null != nl)
{
int n;
while (DTM.NULL != (n = nl.nextNode()))
{
score = (n == context) ? SCORE_OTHER : SCORE_NONE;
if (score == SCORE_OTHER)
{
context = n;
break;
}
}
nl.detach();
}
return score;
| public void | fixupVariables(java.util.Vector vars, int globalsSize)This function is used to fixup variables from QNames to stack frame
indexes at stylesheet build time.
super.fixupVariables(vars, globalsSize);
m_functionExpr.fixupVariables(vars, globalsSize);
|
|