|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.sf.saxon.instruct.FunctionInstr
Handler for xsl:function elements in stylesheet (XSLT 2.0).
Attributes:
name gives the name of the function
saxon:memo-function=yes|no indicates whether it acts as a memo function.
Constructor Summary | |
FunctionInstr()
A FunctionInstr is constructed in two stages. |
Method Summary | |
Value |
call(Value[] actualArgs,
Controller controller,
boolean evaluateTailCalls)
Call this function. |
java.lang.String |
getFunctionName()
Get the name of the function, for diagnostics |
java.lang.String |
getInstructionName()
Get the name of the instruction. |
int |
getLineNumber()
Get the line number of the instruction in the source stylesheet module. |
java.util.HashMap |
getProperties()
Get all the properties of the instruction. |
java.lang.Object |
getProperty(java.lang.String propertyName)
Provide information to the TraceListener if required |
java.lang.String |
getSystemId()
Get the system identifier (URI) of the source stylesheet module containing the instruction. |
void |
initialize(SequenceInstruction body,
java.lang.String baseURI,
java.lang.String displayName,
boolean memoFunction)
|
TailCall |
processLeavingTail(XPathContext context)
Dummy processLeavingTail() method |
void |
setInstructionDetails(Controller controller,
NamePool namePool,
InstructionDetails details)
Set the name of this instruction for diagnostic and tracing purposes to the string "function" |
void |
setLineNumber(int lineNumber)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public FunctionInstr()
Method Detail |
public void initialize(SequenceInstruction body, java.lang.String baseURI, java.lang.String displayName, boolean memoFunction)
public void setLineNumber(int lineNumber)
public int getLineNumber()
InstructionInfo
getLineNumber
in interface InstructionInfo
public java.lang.String getSystemId()
InstructionInfo
getSystemId
in interface InstructionInfo
public java.lang.Object getProperty(java.lang.String propertyName)
getProperty
in interface InstructionInfo
propertyName
- The name of the required property
public java.util.HashMap getProperties()
InstructionInfo
getProperties
in interface InstructionInfo
public void setInstructionDetails(Controller controller, NamePool namePool, InstructionDetails details)
public java.lang.String getInstructionName()
InstructionInfo
getInstructionName
in interface InstructionInfo
public java.lang.String getFunctionName()
CallableFunction
getFunctionName
in interface CallableFunction
public TailCall processLeavingTail(XPathContext context)
public Value call(Value[] actualArgs, Controller controller, boolean evaluateTailCalls) throws javax.xml.transform.TransformerException
call
in interface CallableFunction
actualArgs
- the arguments supplied to the function. These must have the correct
types required by the function signature (it is the caller's responsibility to check this).
It is acceptable to supply a Closure
to represent a value whose
evaluation will be delayed until it is needed. The array must be the correct size to match
the number of arguments: again, it is the caller's responsibility to check this.controller
- This provides the run-time context for evaluating the function.evaluateTailCalls
- if true, then any function calls contained in the body of the function
are evaluated in the normal way, whether or not they are marked as tail calls. If the argument
is false, then tail calls are not evaluated, and instead a FunctionCallPackage is returned containing
the information needed to evaluate the function. The caller must then be prepared to deal with this
returned value by evaluating the packaged function call (which may return further packaged function
calls, and so on).
javax.xml.transform.TransformerException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |