Xalan-C++ API Reference  1.12.0
Public Types | Public Member Functions | List of all members
xalanc::XPathEnvSupport Class Referenceabstract

#include <xalanc/XPath/XPathEnvSupport.hpp>

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

Public Types

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

 XPathEnvSupport ()
 
virtual ~XPathEnvSupport ()
 
virtual void problem (eSource source, eClassification classification, const XalanDOMString &msg, const Locator *locator, const XalanNode *sourceNode)=0
 Function that is called when a problem event occurs. More...
 
virtual void problem (eSource source, eClassification classification, const XalanDOMString &msg, const XalanNode *sourceNode)=0
 Function that is called when a problem event occurs. More...
 
virtual XalanDocumentparseXML (MemoryManager &theManager, const XalanDOMString &urlString, const XalanDOMString &base, ErrorHandler *theErrorHandler=0)=0
 Provides support for XML parsing service. More...
 
virtual XalanDocumentgetSourceDocument (const XalanDOMString &theURI) const =0
 Get the source document for the given URI. More...
 
virtual void setSourceDocument (const XalanDOMString &theURI, XalanDocument *theDocument)=0
 Associate a document with a given URI. More...
 
virtual const XalanDOMStringfindURIFromDoc (const XalanDocument *owner) const =0
 Given a DOM Document, tell what URI was used to parse it. More...
 
virtual bool elementAvailable (const XalanDOMString &theNamespace, const XalanDOMString &elementName) const =0
 Determine if an external element is available. More...
 
virtual bool functionAvailable (const XalanDOMString &theNamespace, const XalanDOMString &functionName) const =0
 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 =0
 Handle an extension function. More...
 
virtual void reset ()=0
 Reset the instance. More...
 
- Public Member Functions inherited from xalanc::ProblemListenerBase
 ProblemListenerBase ()
 
virtual ~ProblemListenerBase ()
 

Additional Inherited Members

- 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...
 
- Static Protected Attributes inherited from xalanc::ProblemListenerBase
static const XalanMessages::Codes s_messageCodes [eSourceCount][eClassificationCount]
 

Detailed Description

Definition at line 60 of file XPathEnvSupport.hpp.

Member Typedef Documentation

◆ LocatorType

typedef xercesc::Locator xalanc::XPathEnvSupport::LocatorType

Definition at line 64 of file XPathEnvSupport.hpp.

◆ XObjectArgVectorType

Definition at line 66 of file XPathEnvSupport.hpp.

Constructor & Destructor Documentation

◆ XPathEnvSupport()

xalanc::XPathEnvSupport::XPathEnvSupport ( )

◆ ~XPathEnvSupport()

virtual xalanc::XPathEnvSupport::~XPathEnvSupport ( )
virtual

Member Function Documentation

◆ elementAvailable()

virtual bool xalanc::XPathEnvSupport::elementAvailable ( const XalanDOMString theNamespace,
const XalanDOMString elementName 
) const
pure 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

Implemented in xalanc::XSLTProcessorEnvSupport, xalanc::XPathEnvSupportDefault, and xalanc::XSLTProcessorEnvSupportDefault.

◆ extFunction()

virtual XObjectPtr xalanc::XPathEnvSupport::extFunction ( XPathExecutionContext executionContext,
const XalanDOMString theNamespace,
const XalanDOMString functionName,
XalanNode context,
const XObjectArgVectorType argVec,
const Locator *  locator 
) const
pure 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

Implemented in xalanc::XSLTProcessorEnvSupport, xalanc::XPathEnvSupportDefault, and xalanc::XSLTProcessorEnvSupportDefault.

◆ findURIFromDoc()

virtual const XalanDOMString& xalanc::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
ownersource document
Returns
document URI

Implemented in xalanc::XSLTProcessorEnvSupport, xalanc::XPathEnvSupportDefault, and xalanc::XSLTProcessorEnvSupportDefault.

◆ functionAvailable()

virtual bool xalanc::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
theNamespacenamespace for the function
functionNamename of the function
Returns
whether the function is available or not

Implemented in xalanc::XSLTProcessorEnvSupport, xalanc::XPathEnvSupportDefault, and xalanc::XSLTProcessorEnvSupportDefault.

◆ getSourceDocument()

virtual XalanDocument* xalanc::XPathEnvSupport::getSourceDocument ( const XalanDOMString theURI) const
pure virtual

Get the source document for the given URI.

Parameters
theURIdocument URI
Returns
source document

Implemented in xalanc::XSLTProcessorEnvSupport, xalanc::XPathEnvSupportDefault, and xalanc::XSLTProcessorEnvSupportDefault.

◆ parseXML()

virtual XalanDocument* xalanc::XPathEnvSupport::parseXML ( MemoryManager &  theManager,
const XalanDOMString urlString,
const XalanDOMString base,
ErrorHandler *  theErrorHandler = 0 
)
pure 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

Implemented in xalanc::XSLTProcessorEnvSupport, xalanc::XPathEnvSupportDefault, and xalanc::XSLTProcessorEnvSupportDefault.

◆ problem() [1/2]

virtual void xalanc::XPathEnvSupport::problem ( eSource  source,
eClassification  classification,
const XalanDOMString msg,
const Locator *  locator,
const XalanNode sourceNode 
)
pure 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::ProblemListenerBase.

Implemented in xalanc::XSLTProcessorEnvSupport, xalanc::XSLTProcessorEnvSupportDefault, and xalanc::XPathEnvSupportDefault.

◆ problem() [2/2]

virtual void xalanc::XPathEnvSupport::problem ( eSource  source,
eClassification  classification,
const XalanDOMString msg,
const XalanNode sourceNode 
)
pure 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::ProblemListenerBase.

Implemented in xalanc::XSLTProcessorEnvSupport, xalanc::XSLTProcessorEnvSupportDefault, and xalanc::XPathEnvSupportDefault.

◆ reset()

virtual void xalanc::XPathEnvSupport::reset ( )
pure virtual

◆ setSourceDocument()

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

Associate a document with a given URI.

Parameters
theURIdocument URI
theDocumentsource document

Implemented in xalanc::XSLTProcessorEnvSupport, xalanc::XPathEnvSupportDefault, and xalanc::XSLTProcessorEnvSupportDefault.


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