Xalan-C++ API Reference  1.12.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
xalanc::ExtensionNSHandler Class Reference

#include <xalanc/XSLT/ExtensionNSHandler.hpp>

Inheritance diagram for xalanc::ExtensionNSHandler:
[legend]
Collaboration diagram for xalanc::ExtensionNSHandler:
[legend]

Public Member Functions

 ExtensionNSHandler (const XalanDOMString &namespaceUri, MemoryManager &theManager)
 Construct a new extension namespace handler for a given extension NS. More...
 
 ExtensionNSHandler (MemoryManager &theManager, const XalanDOMString &namespaceUri, const XalanDOMString &elemNames, const XalanDOMString &funcNames, const XalanDOMString &lang, const XalanDOMString &srcURL, const XalanDOMString &src)
 Construct a new extension namespace handler given all the information needed. More...
 
virtual void setFunctions (const XalanDOMString &funcNames)
 Set function local parts of extension NS. More...
 
virtual void setScript (const XalanDOMString &lang, const XalanDOMString &srcURL, const XalanDOMString &scriptSrc)
 Set the script data for this extension NS. More...
 
void setElements (const XalanDOMString &elemNames)
 Set element local parts of extension NS. More...
 
bool isElementAvailable (const XalanDOMString &element) const
 Tests whether a certain element name is known within this namespace. More...
 
void processElement (StylesheetExecutionContext &executionContext, const XalanDOMString &localPart, const XalanElement *element, Stylesheet &stylesheetTree, const XalanNode *sourceTree, const XalanNode *sourceNode, const XalanQName &mode)
 Process a call to this extension namespace via an element. More...
 
- Public Member Functions inherited from xalanc::ExtensionFunctionHandler
 ExtensionFunctionHandler (const XalanDOMString &namespaceUri, MemoryManager &theManager)
 Construct a new extension namespace handler for a given extension NS. More...
 
 ExtensionFunctionHandler (MemoryManager &theManager, const XalanDOMString &namespaceUri, const XalanDOMString &funcNames, const XalanDOMString &lang, const XalanDOMString &srcURL, const XalanDOMString &scriptSrc)
 Construct a new extension namespace handler given all the information needed. More...
 
virtual ~ExtensionFunctionHandler ()
 
MemoryManager & getMemoryManager ()
 
virtual bool isFunctionAvailable (const XalanDOMString &function) const
 Tests whether a certain function name is known within this namespace. More...
 
virtual XObjectPtr callFunction (const XalanDOMString &funcName, const ArgVectorType &args)
 Process a call to a function. More...
 

Static Public Member Functions

static ExtensionNSHandlercreate (const XalanDOMString &namespaceUri, MemoryManager &theManager)
 

Protected Member Functions

virtual void startupComponent ()
 Start the component up by executing any script that needs to run at startup time. More...
 

Additional Inherited Members

- Public Types inherited from xalanc::ExtensionFunctionHandler
typedef XalanVector< void * > ArgVectorType
 Vector of pointers to function arguments. More...
 
typedef XalanSet< XalanDOMStringStringSetType
 
- Protected Attributes inherited from xalanc::ExtensionFunctionHandler
XalanDOMString m_namespaceUri
 
XalanDOMString m_scriptLang
 
XalanDOMString m_scriptSrc
 
XalanDOMString m_scriptSrcURL
 
void * m_javaObject
 
StringSetType m_functions
 
bool m_componentStarted
 
- Static Protected Attributes inherited from xalanc::ExtensionFunctionHandler
static const XalanDOMChar s_tokenDelimiterCharacters []
 

Detailed Description

Definition at line 56 of file ExtensionNSHandler.hpp.

Constructor & Destructor Documentation

◆ ExtensionNSHandler() [1/2]

xalanc::ExtensionNSHandler::ExtensionNSHandler ( const XalanDOMString namespaceUri,
MemoryManager &  theManager 
)

Construct a new extension namespace handler for a given extension NS.

This doesn't do anything - just hang on to the namespace URI.

Parameters
namespaceUriextension namespace URI being implemented

◆ ExtensionNSHandler() [2/2]

xalanc::ExtensionNSHandler::ExtensionNSHandler ( MemoryManager &  theManager,
const XalanDOMString namespaceUri,
const XalanDOMString elemNames,
const XalanDOMString funcNames,
const XalanDOMString lang,
const XalanDOMString srcURL,
const XalanDOMString src 
)

Construct a new extension namespace handler given all the information needed.

Parameters
namespaceUriextension namespace URI being implemented
elemNamesstring containing list of elements of extension NS
funcNamesstring containing list of functions of extension NS
langlanguage of code implementing the extension
srcURLvalue of src attribute (if any) - treated as a URL or a classname depending on the value of lang. If srcURL is not null, then scriptSrc is ignored.
scriptSrcthe actual script code (if any)

Member Function Documentation

◆ create()

static ExtensionNSHandler* xalanc::ExtensionNSHandler::create ( const XalanDOMString namespaceUri,
MemoryManager &  theManager 
)
static

◆ isElementAvailable()

bool xalanc::ExtensionNSHandler::isElementAvailable ( const XalanDOMString element) const

Tests whether a certain element name is known within this namespace.

Parameters
elementname of the element being tested
Returns
true if known, false if not

◆ processElement()

void xalanc::ExtensionNSHandler::processElement ( StylesheetExecutionContext executionContext,
const XalanDOMString localPart,
const XalanElement element,
Stylesheet stylesheetTree,
const XalanNode sourceTree,
const XalanNode sourceNode,
const XalanQName mode 
)

Process a call to this extension namespace via an element.

As a side effect, the results are sent to the XSLTProcessor's result tree.

Parameters
localPartelement name's local part
elementextension element being processed
stylesheetTreecompiled stylesheet tree
modecurrent mode
sourceTreeroot of the source tree (but don't assume it's a document)
sourceNodecurrent context node
Exceptions
XSLProcessorExceptionthrown if something goes wrong while running the extension handler
MalformedURLExceptionif loading trouble
FileNotFoundExceptionif loading trouble
IOExceptionif loading trouble
SAXExceptionif parsing trouble

◆ setElements()

void xalanc::ExtensionNSHandler::setElements ( const XalanDOMString elemNames)

Set element local parts of extension NS.

Parameters
elemNameswhitespace separated list of element names defined by this extension namespace

◆ setFunctions()

virtual void xalanc::ExtensionNSHandler::setFunctions ( const XalanDOMString funcNames)
virtual

Set function local parts of extension NS.

Super does the work; I just record that a component desc has been loaded.

Parameters
functionswhitespace separated list of function names defined by this extension namespace

Reimplemented from xalanc::ExtensionFunctionHandler.

◆ setScript()

virtual void xalanc::ExtensionNSHandler::setScript ( const XalanDOMString lang,
const XalanDOMString srcURL,
const XalanDOMString scriptSrc 
)
virtual

Set the script data for this extension NS.

Deferred to super for actual work - only record that a component desc has been loaded.

Parameters
langlanguage of the script
srcURLvalue of src attribute (if any) - treated as a URL or a classname depending on the value of lang. If srcURL is not null, then scriptSrc is ignored.
scriptSrcthe actual script code (if any)

Reimplemented from xalanc::ExtensionFunctionHandler.

◆ startupComponent()

virtual void xalanc::ExtensionNSHandler::startupComponent ( )
protectedvirtual

Start the component up by executing any script that needs to run at startup time.

This needs to happen before any functions can be called on the component.

Reimplemented from xalanc::ExtensionFunctionHandler.


The documentation for this class was generated from the following file: