## 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

# XPathEnvSupport Class Reference

Inheritance diagram for XPathEnvSupport:

[legend]
List of all members.

## Public Types

- typedef XERCES_CPP_NAMESPACE_QUALIFIER
  Locator LocatorType
- typedef Function::XObjectArgVectorType XObjectArgVectorType
- enum eSource {
  eXMLParser = 1, eXSLTProcessor = 2, eXPATHParser = 3, eXPATHProcessor = 4,
  eDataSource = 5
  }
- enum eClassification { eMessage = 0, eWarning = 1, eError = 2 }

## Public Member Functions

- XPathEnvSupport ()
- virtual ~XPathEnvSupport ()
- virtual XalanDocument * parseXML (MemoryManagerType &theManager, const XalanDOMString &urlString, const XalanDOMString &base)=0
    Provides support for XML parsing service.
- virtual XalanDocument * getSourceDocument (const XalanDOMString &theURI) const=0
    Get the source document for the given URI.
- virtual void setSourceDocument (const XalanDOMString &theURI, XalanDocument *theDocument)=0
    Associate a document with a given URI.
- virtual const XalanDOMString & findURIFromDoc (const XalanDocument *owner) const=0
    Given a DOM Document, tell what URI was used to parse it.
- virtual bool elementAvailable (const XalanDOMString &theNamespace, const XalanDOMString &elementName) const=0
    Determine if an external element is available.
- virtual bool functionAvailable (const XalanDOMString &theNamespace, const XalanDOMString &functionName) const=0
    Determine if a function is available.
- virtual XObjectPtr extFunction (XPathExecutionContext &executionContext, const XalanDOMString &theNamespace, const XalanDOMString &functionName, XalanNode *context, const XObjectArgVectorType &argVec, const LocatorType *locator) const=0
    Handle an extension function.
- virtual bool problem (eSource where, eClassification classification, const PrefixResolver *resolver, const XalanNode *sourceNode, const XalanDOMString &msg, const XalanDOMChar *uri, int lineNo, int charOffset) const=0
    Function that is called when a problem event occurs.
- virtual void reset ()=0
    Reset the instance.

## Member Typedef Documentation

typedef XERCES_CPP_NAMESPACE_QUALIFIER Locator XPathEnvSupport::LocatorType

typedef Function::XObjectArgVectorType XPathEnvSupport::XObjectArgVectorType

## Member Enumeration Documentation

enum XPathEnvSupport::eClassification

Enumeration values:

  eMessage |
  eWarning |
  eError |

enum XPathEnvSupport::eSource

Enumeration values:

  eXMLParser |
  eXSLTProcessor |
  eXPATHParser |
  eXPATHProcessor |
  eDataSource |

## Constructor & Destructor Documentation

XPathEnvSupport::XPathEnvSupport | ( |  | ) |

virtual XPathEnvSupport::~XPathEnvSupport | ( |  | ) | `[virtual]`

## Member Function Documentation

virtual bool XPathEnvSupport::elementAvailable | ( | const XalanDOMString & | theNamespace,
|  | const XalanDOMString & | elementName
| ) | const`[pure virtual]`

Determine if an external element is available.

Parameters:

  theNamespace | namespace for the element
  elementName | name of extension element

Returns:
  whether the element is available or not

Implemented in XPathEnvSupportDefault, XSLTProcessorEnvSupport, and XSLTProcessorEnvSupportDefault.

virtual XObjectPtr XPathEnvSupport::extFunction | ( | XPathExecutionContext & | executionContext,
|  | const XalanDOMString & | theNamespace,
|  | const XalanDOMString & | functionName,
|  | XalanNode * | context,
|  | const XObjectArgVectorType & | argVec,
|  | const LocatorType * | locator
| ) | const`[pure virtual]`

Handle an extension function.

Parameters:

  executionContext | current execution context
  theNamespace | namespace of function
  functionName | extension function name
  argVec | vector of arguments to function
  locator | A LocatorType instance for error reporting.

Returns:
  pointer to XObject result

Implemented in XPathEnvSupportDefault, XSLTProcessorEnvSupport, and XSLTProcessorEnvSupportDefault.

virtual const XalanDOMString& XPathEnvSupport::findURIFromDoc | ( | const XalanDocument * | owner | ) | const`[pure virtual]`

Given a DOM Document, tell what URI was used to parse it.

Needed for relative resolution.

Parameters:

  owner | source document

Returns:
  document URI

Implemented in XPathEnvSupportDefault, XSLTProcessorEnvSupport, and XSLTProcessorEnvSupportDefault.

virtual bool XPathEnvSupport::functionAvailable | ( | const XalanDOMString & | theNamespace,
|  | const XalanDOMString & | functionName
| ) | const`[pure virtual]`

Determine if a function is available.

For standard function availability, theNamespace should be an empty string.

Parameters:

  theNamespace | namespace for the function
  functionName | name of the function

Returns:
  whether the function is available or not

Implemented in XPathEnvSupportDefault, XSLTProcessorEnvSupport, and XSLTProcessorEnvSupportDefault.

virtual XalanDocument* XPathEnvSupport::getSourceDocument | ( | const XalanDOMString & | theURI | ) | const`[pure virtual]`

Get the source document for the given URI.

Parameters:

  theURI | document URI

Returns:
  source document

Implemented in XPathEnvSupportDefault, XSLTProcessorEnvSupport, and XSLTProcessorEnvSupportDefault.

virtual XalanDocument* XPathEnvSupport::parseXML | ( | MemoryManagerType & | theManager,
|  | const XalanDOMString & | urlString,
|  | const XalanDOMString & | base
| ) | `[pure virtual]`

Provides support for XML parsing service.

Parameters:

  urlString | location of the XML
  base | base location for URI

Returns:
  parsed document

Implemented in XPathEnvSupportDefault, XSLTProcessorEnvSupport, and XSLTProcessorEnvSupportDefault.

virtual bool XPathEnvSupport::problem | ( | eSource | where,
|  | eClassification | classification,
|  | const PrefixResolver * | resolver,
|  | const XalanNode * | sourceNode,
|  | const XalanDOMString & | msg,
|  | const XalanDOMChar * | uri,
|  | int | lineNo,
|  | int | charOffset
| ) | const`[pure virtual]`

Function that is called when a problem event occurs.

Parameters:

  where | either eXMLParser, eXSLTProcessor, eXPATHParser, eXPATHProcessor, or eDataSource.
  classification | either eWarning, or eError
  resolver | resolver for namespace resolution
  sourceNode | source tree node where the problem occurred (may be 0)
  msg | string message explaining the problem.
  uri | the URI of the stylesheet, if available. May be 0;
  lineNo | line number where the problem occurred.
  charOffset | character offset where the problem.

Returns:
  true if the return is an ERROR, in which case exception will be thrown. Otherwise the processor will continue to process.

Implemented in XPathEnvSupportDefault, XSLTProcessorEnvSupport, and XSLTProcessorEnvSupportDefault.

virtual void XPathEnvSupport::reset | ( |  | ) | `[pure virtual]`

| Reset the instance. Implemented in XPathEnvSupportDefault, XSLTProcessorEnvSupport, and XSLTProcessorEnvSupportDefault.

virtual void XPathEnvSupport::setSourceDocument | ( | const XalanDOMString & | theURI,
|  | XalanDocument * | theDocument
| ) | `[pure virtual]`

Associate a document with a given URI.

Parameters:

  theURI | document URI
  theDocument | source document

Implemented in XPathEnvSupportDefault, XSLTProcessorEnvSupport, and XSLTProcessorEnvSupportDefault.

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

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