BEA Systems, Inc.


weblogic.apache.xalan.extensions
Class ExtensionsTable

java.lang.Object
  |
  +--weblogic.apache.xalan.extensions.ExtensionsTable

public class ExtensionsTable
extends java.lang.Object

Class holding a table registered extension namespace handlers

This class is based on an implementation from the Apache XML Project. In future releases the XML parser, XSLT processor, and associated classes will likely be updated to be based on a later version of the Apache implementations. Since Apache does not guarantee backwards compatibility between versions of their software, we cannot guarantee backwards compatibility of any of the classes contained in the weblogic.apache package or sub-packages.


Field Summary
 java.util.Hashtable m_extensionFunctionNamespaces
           Table of extensions that may be called from the expression language via the call(name, ...) function.
 
Constructor Summary
ExtensionsTable()
           Primes the new ExtensionsTable object with built-in namespaces.
 
Method Summary
 void addExtensionNamespace(java.lang.String uri, ExtensionHandler extNS)
           Register an extension namespace handler.
 boolean elementAvailable(java.lang.String ns, java.lang.String elemName)
          Execute the element-available() function.
 java.lang.Object extFunction(java.lang.String ns, java.lang.String funcName, java.util.Vector argVec, java.lang.Object methodKey, ExpressionContext exprContext)
          Handle an extension function.
 boolean functionAvailable(java.lang.String ns, java.lang.String funcName)
          Execute the function-available() function.
 ExtensionHandler get(java.lang.String extns)
          Get an ExtensionHandler object that represents the given namespace.
 ExtensionHandler makeJavaNamespace(java.lang.String ns)
          Declare the appropriate java extension handler.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_extensionFunctionNamespaces

public java.util.Hashtable m_extensionFunctionNamespaces
Table of extensions that may be called from the expression language via the call(name, ...) function. Objects are keyed on the call name.
Constructor Detail

ExtensionsTable

public ExtensionsTable()
Primes the new ExtensionsTable object with built-in namespaces.
Method Detail

get

public ExtensionHandler get(java.lang.String extns)
Get an ExtensionHandler object that represents the given namespace.

Parameters:
extns - A valid extension namespace.
Returns:
ExtensionHandler object that represents the given namespace.

addExtensionNamespace

public void addExtensionNamespace(java.lang.String uri,
                                  ExtensionHandler extNS)
Register an extension namespace handler. This handler provides functions for testing whether a function is known within the namespace and also for invoking the functions.

Parameters:
uri - the URI for the extension.
extNS - the extension handler.

functionAvailable

public boolean functionAvailable(java.lang.String ns,
                                 java.lang.String funcName)
                          throws javax.xml.transform.TransformerException
Execute the function-available() function.

Parameters:
ns - the URI of namespace in which the function is needed
funcName - the function name being tested
Returns:
whether the given function is available or not.
Throws:
javax.xml.transform.TransformerException -  

elementAvailable

public boolean elementAvailable(java.lang.String ns,
                                java.lang.String elemName)
                         throws javax.xml.transform.TransformerException
Execute the element-available() function.

Parameters:
ns - the URI of namespace in which the function is needed
funcName - the function name being tested
elemName - name of element being tested
Returns:
whether the given function is available or not.
Throws:
javax.xml.transform.TransformerException -  

extFunction

public java.lang.Object extFunction(java.lang.String ns,
                                    java.lang.String funcName,
                                    java.util.Vector argVec,
                                    java.lang.Object methodKey,
                                    ExpressionContext exprContext)
                             throws javax.xml.transform.TransformerException
Handle an extension function.

Parameters:
ns - the URI of namespace in which the function is needed
funcName - the function name being called
argVec - arguments to the function in a vector
methodKey - a unique key identifying this function instance in the stylesheet
exprContext - a context which may be passed to an extension function and provides callback functions to access various areas in the environment
Returns:
result of executing the function
Throws:
javax.xml.transform.TransformerException -  

makeJavaNamespace

public ExtensionHandler makeJavaNamespace(java.lang.String ns)
                                   throws javax.xml.transform.TransformerException
Declare the appropriate java extension handler.

Parameters:
ns - the URI of namespace in which the function is needed
Returns:
an ExtensionHandler for this namespace, or null if not found.
Throws:
javax.xml.transform.TransformerException -  

Documentation is available at
http://download.oracle.com/docs/cd/E13222_01/wls/docs70

Copyright © 2004 BEA Systems, Inc. All Rights Reserved.
WebLogic Server 7.0 API Reference