fi.hut.tml.xsmiles.mlfc.xforms.xpath.xalan
Class FuncNow

java.lang.Object
  extended byorg.apache.xpath.Expression
      extended byorg.apache.xpath.functions.Function
          extended byorg.apache.xpath.functions.FunctionOneArg
              extended byorg.apache.xpath.functions.Function2Args
                  extended byorg.apache.xpath.functions.Function3Args
                      extended byorg.apache.xpath.functions.FunctionMultiArgs
                          extended byfi.hut.tml.xsmiles.mlfc.xforms.xpath.xalan.FuncNow
All Implemented Interfaces:
org.apache.xpath.ExpressionNode, org.apache.xpath.ExpressionOwner, java.io.Serializable, javax.xml.transform.SourceLocator, org.apache.xpath.XPathVisitable

public class FuncNow
extends org.apache.xpath.functions.FunctionMultiArgs

Execute the instance() function. This is just a wrapper for Xalan, the real implementation is in XFormsXPathExtensionHandler

See Also:
Serialized Form

Constructor Summary
FuncNow()
           
 
Method Summary
 void checkNumberArgs(int argNum)
          Check that the number of arguments passed to this function is correct.
 org.apache.xpath.objects.XObject execute(org.apache.xpath.XPathContext xctxt)
          Execute the function.
 boolean isNodesetExpr()
          Tell if the expression is a nodeset expression.
 
Methods inherited from class org.apache.xpath.functions.FunctionMultiArgs
callArgVisitors, canTraverseOutsideSubtree, deepEquals, fixupVariables, getArgs, reportWrongNumberArgs, setArg
 
Methods inherited from class org.apache.xpath.functions.Function3Args
getArg2
 
Methods inherited from class org.apache.xpath.functions.Function2Args
getArg1
 
Methods inherited from class org.apache.xpath.functions.FunctionOneArg
getArg0, getExpression, setExpression
 
Methods inherited from class org.apache.xpath.functions.Function
callVisitors, postCompileStep
 
Methods inherited from class org.apache.xpath.Expression
asIterator, asIteratorRaw, asNode, assertion, bool, error, execute, execute, execute, executeCharsToContentHandler, exprAddChild, exprGetChild, exprGetNumChildren, exprGetParent, exprSetParent, getColumnNumber, getExpressionOwner, getLineNumber, getPublicId, getSystemId, isSameClass, isStableNumber, num, warn, xstr
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FuncNow

public FuncNow()
Method Detail

execute

public org.apache.xpath.objects.XObject execute(org.apache.xpath.XPathContext xctxt)
                                         throws javax.xml.transform.TransformerException
Execute the function. The function must return a valid object.

Parameters:
xctxt - The current execution context.
Returns:
A valid XObject.
Throws:
javax.xml.transform.TransformerException

isNodesetExpr

public boolean isNodesetExpr()
Tell if the expression is a nodeset expression. In other words, tell if you can execute asNode without an exception.

Returns:
true if the expression can be represented as a nodeset.

checkNumberArgs

public void checkNumberArgs(int argNum)
                     throws org.apache.xpath.functions.WrongNumberArgsException
Check that the number of arguments passed to this function is correct.

Parameters:
argNum - The number of arguments that is being passed to the function.
Throws:
org.apache.xpath.functions.WrongNumberArgsException


X-Smiles 1.2