Package org.apache.xalan.extensions
Class ExtensionHandlerExsltFunction
java.lang.Object
org.apache.xalan.extensions.ExtensionHandler
org.apache.xalan.extensions.ExtensionHandlerExsltFunction
Execute EXSLT functions, determine the availability of EXSLT functions, and the
availability of an EXSLT result element.
-
Constructor Summary
ConstructorsConstructorDescriptionExtensionHandlerExsltFunction
(String ns, StylesheetRoot stylesheet) Constructor called from ElemExsltFunction runtimeInit(). -
Method Summary
Modifier and TypeMethodDescriptioncallFunction
(String funcName, Vector args, Object methodKey, ExpressionContext exprContext) Execute the EXSLT function and return the result value.callFunction
(FuncExtFunction extFunction, Vector args, ExpressionContext exprContext) Execute the EXSLT function and return the result value.getFunction
(String funcName) Get the ElemExsltFunction element associated with the function.boolean
isElementAvailable
(String elemName) If an element-available() call applies to an EXSLT result element within an EXSLT function element, return true.boolean
isFunctionAvailable
(String funcName) Does the EXSLT function exist?void
processElement
(String localPart, ElemTemplateElement element, TransformerImpl transformer, Stylesheet stylesheetTree, Object methodKey) Required by ExtensionHandler (an abstract method).
-
Constructor Details
-
ExtensionHandlerExsltFunction
Constructor called from ElemExsltFunction runtimeInit().
-
-
Method Details
-
processElement
public void processElement(String localPart, ElemTemplateElement element, TransformerImpl transformer, Stylesheet stylesheetTree, Object methodKey) throws TransformerException, IOException Required by ExtensionHandler (an abstract method). No-op.- Specified by:
processElement
in classExtensionHandler
- Parameters:
localPart
- Element name's local part.element
- The extension element being processed.transformer
- Handle to TransformerImpl.stylesheetTree
- The compiled stylesheet tree.methodKey
- A key that uniquely identifies this class and method call.- Throws:
TransformerException
- if parsing troubleIOException
- if loading trouble
-
getFunction
Get the ElemExsltFunction element associated with the function.- Parameters:
funcName
- Local name of the function.- Returns:
- the ElemExsltFunction element associated with the function, null if none exists.
-
isFunctionAvailable
Does the EXSLT function exist?- Specified by:
isFunctionAvailable
in classExtensionHandler
- Parameters:
funcName
- Local name of the function.- Returns:
- true if the function exists.
-
isElementAvailable
If an element-available() call applies to an EXSLT result element within an EXSLT function element, return true. Note: The EXSLT function element is a template-level element, and element-available() returns false for it.- Specified by:
isElementAvailable
in classExtensionHandler
- Parameters:
elemName
- name of the element.- Returns:
- true if the function is available.
-
callFunction
public Object callFunction(String funcName, Vector args, Object methodKey, ExpressionContext exprContext) throws TransformerException Execute the EXSLT function and return the result value.- Specified by:
callFunction
in classExtensionHandler
- Parameters:
funcName
- Name of the EXSLT function.args
- The arguments of the function call.methodKey
- Not used.exprContext
- Used to get the XPathContext.- Returns:
- the return value of the function evaluation.
- Throws:
TransformerException
-
callFunction
public Object callFunction(FuncExtFunction extFunction, Vector args, ExpressionContext exprContext) throws TransformerException Execute the EXSLT function and return the result value.- Specified by:
callFunction
in classExtensionHandler
- Parameters:
extFunction
- The XPath extension functionargs
- The arguments of the function call.exprContext
- The context in which this expression is being executed.- Returns:
- the return value of the function evaluation.
- Throws:
TransformerException
-