org.exolab.adaptx.xslt
Interface FunctionResolver


public interface FunctionResolver

Simple interface which provides a way to resolve "extension" functions

Version:
$Revision: 3633 $ $Date: 2003-03-01 02:38:44 -0500 (Sat, 01 Mar 2003) $
Author:
Keith Visco

Method Summary
 java.lang.String[] getNamespaces()
          Returns the namespaces for this FunctionResolver.
 boolean hasFunction(java.lang.String namespace, java.lang.String name)
          Returns true if this FunctionResolver has a function with the given name.
 XSLTFunction resolveFunction(java.lang.String namespace, java.lang.String name)
          Returns the FunctionCall associated with the given name
 

Method Detail

getNamespaces

java.lang.String[] getNamespaces()
Returns the namespaces for this FunctionResolver. These are the namespaces which will be used by extension functions (within the XSLT document) that are to be resolved by this FunctionResolver,within the XSLT document.
For Example:
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform/" 
                     xmlns:foo="http://my.example.com">
     ...
     <xsl:template match="...">
         ...
         <xsl:value-of select="foo:my-function()">
         ...
     </xsl:template>
     ...
  </xsl:stylesheet>
 

Returns:
an array of namespaces supported by this FunctionResolver

hasFunction

boolean hasFunction(java.lang.String namespace,
                    java.lang.String name)
Returns true if this FunctionResolver has a function with the given name.

Parameters:
namespace - of the function
name - the name of the function

resolveFunction

XSLTFunction resolveFunction(java.lang.String namespace,
                             java.lang.String name)
Returns the FunctionCall associated with the given name

Parameters:
namespace - the namespace of the function
name - the name of the function
Returns:
the FunctionCall or null if no function could be found.