Package org.apache.xalan.extensions
Class ExtensionHandlerExsltFunction
- java.lang.Object
-
- org.apache.xalan.extensions.ExtensionHandler
-
- org.apache.xalan.extensions.ExtensionHandlerExsltFunction
-
public class ExtensionHandlerExsltFunction extends ExtensionHandler
Execute EXSLT functions, determine the availability of EXSLT functions, and the availability of an EXSLT result element.
-
-
Constructor Summary
Constructors Constructor Description ExtensionHandlerExsltFunction(java.lang.String ns, StylesheetRoot stylesheet)Constructor called from ElemExsltFunction runtimeInit().
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectcallFunction(java.lang.String funcName, java.util.Vector args, java.lang.Object methodKey, ExpressionContext exprContext)Execute the EXSLT function and return the result value.java.lang.ObjectcallFunction(FuncExtFunction extFunction, java.util.Vector args, ExpressionContext exprContext)Execute the EXSLT function and return the result value.ElemExsltFunctiongetFunction(java.lang.String funcName)Get the ElemExsltFunction element associated with the function.booleanisElementAvailable(java.lang.String elemName)If an element-available() call applies to an EXSLT result element within an EXSLT function element, return true.booleanisFunctionAvailable(java.lang.String funcName)Does the EXSLT function exist?voidprocessElement(java.lang.String localPart, ElemTemplateElement element, TransformerImpl transformer, Stylesheet stylesheetTree, java.lang.Object methodKey)Required by ExtensionHandler (an abstract method).
-
-
-
Constructor Detail
-
ExtensionHandlerExsltFunction
public ExtensionHandlerExsltFunction(java.lang.String ns, StylesheetRoot stylesheet)Constructor called from ElemExsltFunction runtimeInit().
-
-
Method Detail
-
processElement
public void processElement(java.lang.String localPart, ElemTemplateElement element, TransformerImpl transformer, Stylesheet stylesheetTree, java.lang.Object methodKey) throws javax.xml.transform.TransformerException, java.io.IOExceptionRequired by ExtensionHandler (an abstract method). No-op.- Specified by:
processElementin 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:
javax.xml.transform.TransformerException- if parsing troublejava.io.IOException- if loading trouble
-
getFunction
public ElemExsltFunction getFunction(java.lang.String funcName)
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
public boolean isFunctionAvailable(java.lang.String funcName)
Does the EXSLT function exist?- Specified by:
isFunctionAvailablein classExtensionHandler- Parameters:
funcName- Local name of the function.- Returns:
- true if the function exists.
-
isElementAvailable
public boolean isElementAvailable(java.lang.String elemName)
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:
isElementAvailablein classExtensionHandler- Parameters:
elemName- name of the element.- Returns:
- true if the function is available.
-
callFunction
public java.lang.Object callFunction(java.lang.String funcName, java.util.Vector args, java.lang.Object methodKey, ExpressionContext exprContext) throws javax.xml.transform.TransformerExceptionExecute the EXSLT function and return the result value.- Specified by:
callFunctionin 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:
javax.xml.transform.TransformerException
-
callFunction
public java.lang.Object callFunction(FuncExtFunction extFunction, java.util.Vector args, ExpressionContext exprContext) throws javax.xml.transform.TransformerException
Execute the EXSLT function and return the result value.- Specified by:
callFunctionin 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:
javax.xml.transform.TransformerException
-
-