## Xalan-C++ API Documentation

### The Xalan C++ XSLT Processor Version 1.9

Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

# ExtensionNSHandler Class Reference

Inheritance diagram for ExtensionNSHandler:

[legend]
Collaboration diagram for ExtensionNSHandler:

[legend]
List of all members.

## Public Member Functions

- ExtensionNSHandler (const XalanDOMString &namespaceUri, MemoryManagerType &theManager)
    Construct a new extension namespace handler for a given extension NS.
- ExtensionNSHandler (MemoryManagerType &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.
- virtual void setFunctions (const XalanDOMString &funcNames)
    Set function local parts of extension NS.
- virtual void setScript (const XalanDOMString &lang, const XalanDOMString &srcURL, const XalanDOMString &scriptSrc)
    Set the script data for this extension NS.
- void setElements (const XalanDOMString &elemNames)
    Set element local parts of extension NS.
- bool isElementAvailable (const XalanDOMString &element) const
    Tests whether a certain element name is known within this namespace.
- 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.

## Static Public Member Functions

- ExtensionNSHandler * create (const XalanDOMString &namespaceUri, MemoryManagerType &theManager)

## Protected Member Functions

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

## Constructor & Destructor Documentation

ExtensionNSHandler::ExtensionNSHandler | ( | const XalanDOMString & | namespaceUri,
|  | MemoryManagerType & | 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:
  namespaceUri | extension namespace URI being implemented

ExtensionNSHandler::ExtensionNSHandler | ( | MemoryManagerType & | 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:
  namespaceUri | extension namespace URI being implemented
  elemNames | string containing list of elements of extension NS
  funcNames | string containing list of functions of extension NS
  lang | language of code implementing the extension
  srcURL | value 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.
  scriptSrc | the actual script code (if any)

## Member Function Documentation

ExtensionNSHandler* ExtensionNSHandler::create | ( | const XalanDOMString & | namespaceUri,
|  | MemoryManagerType & | theManager
| ) | `[static]`

bool ExtensionNSHandler::isElementAvailable | ( | const XalanDOMString & | element | ) | const

  | Tests whether a certain element name is known within this namespace. Parameters:
  element | name of the element being tested
Returns: true if known, false if not

void 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:
  localPart | element name's local part
  element | extension element being processed
  stylesheetTree | compiled stylesheet tree
  mode | current mode
  sourceTree | root of the source tree (but don't assume it's a document)
  sourceNode | current context node
  Exceptions:
  XSLProcessorException | thrown if something goes wrong while running the extension handler
  MalformedURLException | if loading trouble
  FileNotFoundException | if loading trouble
  IOException | if loading trouble
  SAXException | if parsing trouble

void ExtensionNSHandler::setElements | ( | const XalanDOMString & | elemNames | ) |

  | Set element local parts of extension NS. Parameters:
  elemNames | whitespace separated list of element names defined by this extension namespace

virtual void 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:
  functions | whitespace separated list of function names defined by this extension namespace
Reimplemented from ExtensionFunctionHandler.

virtual void 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:
  lang | language of the script
  srcURL | value 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.
  scriptSrc | the actual script code (if any)
Reimplemented from ExtensionFunctionHandler.

virtual void ExtensionNSHandler::startupComponent | ( |  | ) | `[protected, virtual]`

| 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 ExtensionFunctionHandler.

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

- ExtensionNSHandler.hpp

Interpreting class diagrams

Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.

Xalan-C++ XSLT Processor Version 1.9 Copyright © 1999-2004 The Apache Software Foundation. All Rights Reserved.