Methods Summary |
---|
public boolean | Arg0IsNodesetExpr()Tell if the expression is a nodeset expression.
return (null == m_arg0) ? true : m_arg0.isNodesetExpr();
|
public boolean | canTraverseOutsideSubtree()Tell if this expression or it's subexpressions can traverse outside
the current subtree.
return (null == m_arg0) ? false : super.canTraverseOutsideSubtree();
|
public void | checkNumberArgs(int argNum)Check that the number of arguments passed to this function is correct.
if (argNum > 1)
reportWrongNumberArgs();
|
protected int | getArg0AsNode(com.sun.org.apache.xpath.internal.XPathContext xctxt)Execute the first argument expression that is expected to return a
nodeset. If the argument is null, then return the current context node.
return (null == m_arg0)
? xctxt.getCurrentNode() : m_arg0.asNode(xctxt);
|
protected double | getArg0AsNumber(com.sun.org.apache.xpath.internal.XPathContext xctxt)Execute the first argument expression that is expected to return a
number. If the argument is null, then get the number value from the
current context node.
if(null == m_arg0)
{
int currentNode = xctxt.getCurrentNode();
if(DTM.NULL == currentNode)
return 0;
else
{
DTM dtm = xctxt.getDTM(currentNode);
XMLString str = dtm.getStringValue(currentNode);
return str.toDouble();
}
}
else
return m_arg0.execute(xctxt).num();
|
protected com.sun.org.apache.xml.internal.utils.XMLString | getArg0AsString(com.sun.org.apache.xpath.internal.XPathContext xctxt)Execute the first argument expression that is expected to return a
string. If the argument is null, then get the string value from the
current context node.
if(null == m_arg0)
{
int currentNode = xctxt.getCurrentNode();
if(DTM.NULL == currentNode)
return XString.EMPTYSTRING;
else
{
DTM dtm = xctxt.getDTM(currentNode);
return dtm.getStringValue(currentNode);
}
}
else
return m_arg0.execute(xctxt).xstr();
|
protected void | reportWrongNumberArgs()Constructs and throws a WrongNumberArgException with the appropriate
message for this function object.
throw new WrongNumberArgsException(XSLMessages.createXPATHMessage(XPATHErrorResources.ER_ZERO_OR_ONE, null)); //"0 or 1");
|