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

#include <xalanc/XPath/XPathEnvSupportDefault.hpp>

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

Classes

struct  NamespaceFunctionTableDeleteFunctor
 

Public Types

typedef XalanMap< XalanDOMString, XalanDocument * > SourceDocsTableType
 
typedef FunctionTableTypeDefinition FunctionTableType
 
typedef XalanMap< XalanDOMString, FunctionTableTypeNamespaceFunctionTablesType
 
- Public Types inherited from xalanc::XPathEnvSupport
typedef xercesc::Locator LocatorType
 
typedef Function::XObjectArgVectorType XObjectArgVectorType
 
- Public Types inherited from xalanc::ProblemListenerBase
enum  eSource {
  eXMLPARSER = 0, eXMLParser = 0, eXSLPROCESSOR = 1, eXSLTProcessor = 1,
  eXPATH = 2, eXPath = 2, eSourceCount
}
 
enum  eClassification {
  eMESSAGE = 0, eMessage = 0, eWARNING = 1, eWarning = 1,
  eERROR = 2, eError = 2, eClassificationCount
}
 
typedef eSource eProblemSource
 

Public Member Functions

 XPathEnvSupportDefault (MemoryManager &theManager XALAN_DEFAULT_MEMMGR)
 
virtual ~XPathEnvSupportDefault ()
 
MemoryManager & getMemoryManager () const
 
virtual void setPrintWriter (PrintWriter *pw)
 
virtual void problem (eSource source, eClassification classification, const XalanDOMString &msg, const Locator *locator, const XalanNode *sourceNode)
 Function that is called when a problem event occurs. More...
 
virtual void problem (eSource source, eClassification classification, const XalanDOMString &msg, const XalanNode *sourceNode)
 Function that is called when a problem event occurs. More...
 
virtual void installExternalFunctionLocal (const XalanDOMString &theNamespace, const XalanDOMString &functionName, const Function &function)
 Install an external function in the local space. More...
 
virtual void uninstallExternalFunctionLocal (const XalanDOMString &theNamespace, const XalanDOMString &functionName)
 Uninstall an external function from the local space. More...
 
virtual XalanDocumentparseXML (MemoryManager &theManager, const XalanDOMString &urlString, const XalanDOMString &base, ErrorHandler *theErrorHandler=0)
 Provides support for XML parsing service. More...
 
virtual XalanDocumentgetSourceDocument (const XalanDOMString &theURI) const
 Get the source document for the given URI. More...
 
virtual void setSourceDocument (const XalanDOMString &theURI, XalanDocument *theDocument)
 Associate a document with a given URI. More...
 
virtual const XalanDOMStringfindURIFromDoc (const XalanDocument *owner) const
 Given a DOM Document, tell what URI was used to parse it. More...
 
virtual bool elementAvailable (const XalanDOMString &theNamespace, const XalanDOMString &elementName) const
 Determine if an external element is available. More...
 
virtual bool functionAvailable (const XalanDOMString &theNamespace, const XalanDOMString &functionName) const
 Determine if a function is available. More...
 
virtual XObjectPtr extFunction (XPathExecutionContext &executionContext, const XalanDOMString &theNamespace, const XalanDOMString &functionName, XalanNode *context, const XObjectArgVectorType &argVec, const Locator *locator) const
 Handle an extension function. More...
 
virtual void reset ()
 Reset the instance. More...
 
- Public Member Functions inherited from xalanc::XPathEnvSupport
 XPathEnvSupport ()
 
virtual ~XPathEnvSupport ()
 
- Public Member Functions inherited from xalanc::ProblemListenerBase
 ProblemListenerBase ()
 
virtual ~ProblemListenerBase ()
 

Static Public Member Functions

static void initialize (MemoryManager &theManager)
 Perform initialization of statics – must be called before any processing occurs. More...
 
static void terminate ()
 Perform termination of statics. More...
 
static void installExternalFunctionGlobal (const XalanDOMString &theNamespace, const XalanDOMString &functionName, const Function &function)
 Install an external function in the global space. More...
 
static void uninstallExternalFunctionGlobal (const XalanDOMString &theNamespace, const XalanDOMString &functionName)
 Uninstall an external function from the global space. More...
 
- Static Public Member Functions inherited from xalanc::ProblemListenerBase
static void defaultFormat (PrintWriter &pw, eSource source, eClassification classification, const XalanDOMString &msg, const Locator *locator, const XalanNode *sourceNode)
 Function to format a problem call to a PrintWriter instance. More...
 
static void defaultFormat (PrintWriter &pw, eSource source, eClassification classification, const XalanDOMString &msg, const XalanNode *sourceNode)
 Function to format a problem call to a PrintWriter instance. More...
 

Protected Member Functions

const FunctionfindFunction (const XalanDOMString &theNamespace, const XalanDOMString &functionName) const
 Find an external function. More...
 

Additional Inherited Members

- Static Protected Attributes inherited from xalanc::ProblemListenerBase
static const XalanMessages::Codes s_messageCodes [eSourceCount][eClassificationCount]
 

Detailed Description

Definition at line 46 of file XPathEnvSupportDefault.hpp.

Member Typedef Documentation

◆ FunctionTableType

Definition at line 51 of file XPathEnvSupportDefault.hpp.

◆ NamespaceFunctionTablesType

Definition at line 52 of file XPathEnvSupportDefault.hpp.

◆ SourceDocsTableType

Definition at line 50 of file XPathEnvSupportDefault.hpp.

Constructor & Destructor Documentation

◆ XPathEnvSupportDefault()

xalanc::XPathEnvSupportDefault::XPathEnvSupportDefault ( MemoryManager &theManager  XALAN_DEFAULT_MEMMGR)

◆ ~XPathEnvSupportDefault()

virtual xalanc::XPathEnvSupportDefault::~XPathEnvSupportDefault ( )
virtual

Member Function Documentation

◆ elementAvailable()

virtual bool xalanc::XPathEnvSupportDefault::elementAvailable ( const XalanDOMString theNamespace,
const XalanDOMString elementName 
) const
virtual

Determine if an external element is available.

Parameters
theNamespacenamespace for the element
elementNamename of extension element
Returns
whether the element is available or not

Implements xalanc::XPathEnvSupport.

◆ extFunction()

virtual XObjectPtr xalanc::XPathEnvSupportDefault::extFunction ( XPathExecutionContext executionContext,
const XalanDOMString theNamespace,
const XalanDOMString functionName,
XalanNode context,
const XObjectArgVectorType argVec,
const Locator *  locator 
) const
virtual

Handle an extension function.

Parameters
executionContextcurrent execution context
theNamespacenamespace of function
functionNameextension function name
argVecvector of arguments to function
locatorA Locator instance for error reporting.
Returns
pointer to XObject result

Implements xalanc::XPathEnvSupport.

◆ findFunction()

const Function* xalanc::XPathEnvSupportDefault::findFunction ( const XalanDOMString theNamespace,
const XalanDOMString functionName 
) const
protected

Find an external function.

Parameters
theNamespaceThe namespace for the function.
functionNameThe name of the function.
Returns
a pointer to the function if found, or 0 if not found.

◆ findURIFromDoc()

virtual const XalanDOMString& xalanc::XPathEnvSupportDefault::findURIFromDoc ( const XalanDocument owner) const
virtual

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

Needed for relative resolution.

Parameters
ownersource document
Returns
document URI

Implements xalanc::XPathEnvSupport.

◆ functionAvailable()

virtual bool xalanc::XPathEnvSupportDefault::functionAvailable ( const XalanDOMString theNamespace,
const XalanDOMString functionName 
) const
virtual

Determine if a function is available.

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

Parameters
theNamespacenamespace for the function
functionNamename of the function
Returns
whether the function is available or not

Implements xalanc::XPathEnvSupport.

◆ getMemoryManager()

MemoryManager& xalanc::XPathEnvSupportDefault::getMemoryManager ( ) const
inline

Definition at line 74 of file XPathEnvSupportDefault.hpp.

◆ getSourceDocument()

virtual XalanDocument* xalanc::XPathEnvSupportDefault::getSourceDocument ( const XalanDOMString theURI) const
virtual

Get the source document for the given URI.

Parameters
theURIdocument URI
Returns
source document

Implements xalanc::XPathEnvSupport.

◆ initialize()

static void xalanc::XPathEnvSupportDefault::initialize ( MemoryManager &  theManager)
static

Perform initialization of statics – must be called before any processing occurs.

See class XPathInit.

◆ installExternalFunctionGlobal()

static void xalanc::XPathEnvSupportDefault::installExternalFunctionGlobal ( const XalanDOMString theNamespace,
const XalanDOMString functionName,
const Function function 
)
static

Install an external function in the global space.

Parameters
theNamespaceThe namespace for the functionl
functionNameThe name of the function.
functionThe function to install.

◆ installExternalFunctionLocal()

virtual void xalanc::XPathEnvSupportDefault::installExternalFunctionLocal ( const XalanDOMString theNamespace,
const XalanDOMString functionName,
const Function function 
)
virtual

Install an external function in the local space.

Parameters
theNamespaceThe namespace for the functionl
functionNameThe name of the function.
functionThe function to install.

◆ parseXML()

virtual XalanDocument* xalanc::XPathEnvSupportDefault::parseXML ( MemoryManager &  theManager,
const XalanDOMString urlString,
const XalanDOMString base,
ErrorHandler *  theErrorHandler = 0 
)
virtual

Provides support for XML parsing service.

Parameters
theManagerThe MemoryManager instance to use.
urlStringlocation of the XML
basebase location for URI
theErrorHandlerAn optional ErrorHandler instance for error reporting.
Returns
parsed document

Implements xalanc::XPathEnvSupport.

◆ problem() [1/2]

virtual void xalanc::XPathEnvSupportDefault::problem ( eSource  source,
eClassification  classification,
const XalanDOMString msg,
const Locator *  locator,
const XalanNode sourceNode 
)
virtual

Function that is called when a problem event occurs.

Parameters
sourceEither eXMLParser, eXSLProcessor, or eXPATH.
classificationEither eMessage, eWarning, or eError.
locatorThe current Locator instance for the stylesheet. Maybe be a null pointer.
sourceNodeThe current source node, if any.
msgThe error message.

Implements xalanc::XPathEnvSupport.

◆ problem() [2/2]

virtual void xalanc::XPathEnvSupportDefault::problem ( eSource  source,
eClassification  classification,
const XalanDOMString msg,
const XalanNode sourceNode 
)
virtual

Function that is called when a problem event occurs.

This version assumes location information is already formatted into the message.

Parameters
sourceeither eXMLPARSER, eXSLPROCESSOR, or eXPATH
classificationeither eMESSAGE, eERROR or eWARNING
msgstring message explaining the problem.

Implements xalanc::XPathEnvSupport.

◆ reset()

virtual void xalanc::XPathEnvSupportDefault::reset ( )
virtual

Reset the instance.

Implements xalanc::XPathEnvSupport.

◆ setPrintWriter()

virtual void xalanc::XPathEnvSupportDefault::setPrintWriter ( PrintWriter pw)
virtual

◆ setSourceDocument()

virtual void xalanc::XPathEnvSupportDefault::setSourceDocument ( const XalanDOMString theURI,
XalanDocument theDocument 
)
virtual

Associate a document with a given URI.

Parameters
theURIdocument URI
theDocumentsource document

Implements xalanc::XPathEnvSupport.

◆ terminate()

static void xalanc::XPathEnvSupportDefault::terminate ( )
static

Perform termination of statics.

See class XPathInit.

◆ uninstallExternalFunctionGlobal()

static void xalanc::XPathEnvSupportDefault::uninstallExternalFunctionGlobal ( const XalanDOMString theNamespace,
const XalanDOMString functionName 
)
static

Uninstall an external function from the global space.

Parameters
theNamespaceThe namespace for the functionl
functionNameThe name of the function.

◆ uninstallExternalFunctionLocal()

virtual void xalanc::XPathEnvSupportDefault::uninstallExternalFunctionLocal ( const XalanDOMString theNamespace,
const XalanDOMString functionName 
)
virtual

Uninstall an external function from the local space.

Parameters
theNamespaceThe namespace for the functionl
functionNameThe name of the function.

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