Xalan-C++ API Reference 1.12.0
|
A basic implementation of the class XPathExecutionContext. More...
#include <xalanc/XPath/XPathExecutionContextDefault.hpp>
Classes | |
struct | ContextNodeListPositionCache |
Public Types | |
typedef XalanVector< XalanNode * > | CurrentNodeStackType |
typedef XalanVector< const NodeRefListBase * > | ContextNodeListStackType |
![]() | |
typedef XalanVector< XObjectPtr > | XObjectArgVectorType |
typedef NodeRefListBase::size_type | size_type |
typedef GetCachedNodeList | BorrowReturnMutableNodeRefList |
typedef GetCachedString | GetAndReleaseCachedString |
![]() | |
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 | |
XPathExecutionContextDefault (XPathEnvSupport &theXPathEnvSupport, DOMSupport &theDOMSupport, XObjectFactory &theXObjectFactory, XalanNode *theCurrentNode=0, const NodeRefListBase *theContextNodeList=0, const PrefixResolver *thePrefixResolver=0) | |
Construct an XPathExecutionContextDefault object. | |
XPathExecutionContextDefault (MemoryManager &theManager, XalanNode *theCurrentNode=0, const NodeRefListBase *theContextNodeList=0, const PrefixResolver *thePrefixResolver=0) | |
Construct an XPathExecutionContextDefault object. | |
virtual | ~XPathExecutionContextDefault () |
XPathEnvSupport * | getXPathEnvSupport () const |
Get the XPathEnvSupport instance. | |
void | setXPathEnvSupport (XPathEnvSupport *theSupport) |
Set the XPathEnvSupport instance. | |
void | setDOMSupport (DOMSupport *theDOMSupport) |
Set the DOMSupport instance. | |
void | setXObjectFactory (XObjectFactory *theXObjectFactory) |
Set the XObjectFactory instance. | |
XalanQNameByValue & | getScratchQName () const |
Get a reference to the scratch QNameByValue instance. | |
virtual void | doFormatNumber (double number, const XalanDOMString &pattern, const XalanDecimalFormatSymbols *theDFS, XalanDOMString &theResult, const XalanNode *context=0, const Locator *locator=0) |
virtual void | reset () |
Reset the instance. | |
virtual XalanNode * | getCurrentNode () const |
Retrieve the node currently being executed. | |
virtual void | pushCurrentNode (XalanNode *theCurrentNode) |
Change the node currently being executed. | |
virtual void | popCurrentNode () |
Reset the node currently being executed. | |
virtual bool | isNodeAfter (const XalanNode &node1, const XalanNode &node2) const |
Determine if a node is after another node, in document order. | |
virtual void | pushContextNodeList (const NodeRefListBase &theList) |
Push the node list for current context. | |
virtual void | popContextNodeList () |
Pop the node list for current context. | |
virtual const NodeRefListBase & | getContextNodeList () const |
Get the node list for current context. | |
virtual size_type | getContextNodeListLength () const |
virtual size_type | getContextNodeListPosition (const XalanNode &contextNode) const |
virtual bool | elementAvailable (const XalanQName &theQName) const |
Determine if an external element is available. | |
virtual bool | elementAvailable (const XalanDOMString &theName, const Locator *locator) const |
Determine if an external element is available by resolving a string to a QName. | |
virtual bool | functionAvailable (const XalanQName &theQName) const |
Determine if a function is available. | |
virtual bool | functionAvailable (const XalanDOMString &theName, const Locator *locator) const |
Determine if a function is available. | |
virtual const XObjectPtr | extFunction (const XalanDOMString &theNamespace, const XalanDOMString &functionName, XalanNode *context, const XObjectArgVectorType &argVec, const Locator *locator) |
Handle an extension function. | |
virtual XalanDocument * | parseXML (MemoryManager &theManager, const XalanDOMString &urlString, const XalanDOMString &base, ErrorHandler *theErrorHandler=0) const |
Provides support for XML parsing service. | |
virtual MutableNodeRefList * | borrowMutableNodeRefList () |
Borrow a cached MutableNodeRefList instance. | |
virtual bool | returnMutableNodeRefList (MutableNodeRefList *theList) |
Return a previously borrowed MutableNodeRefList instance. | |
virtual MutableNodeRefList * | createMutableNodeRefList (MemoryManager &theManager) const |
Create a MutableNodeRefList with the appropriate context. | |
virtual XalanDOMString & | getCachedString () |
Get a cached string for temporary use. | |
virtual bool | releaseCachedString (XalanDOMString &theString) |
Return a cached string. | |
virtual void | getNodeSetByKey (XalanNode *context, const XalanQName &qname, const XalanDOMString &ref, const Locator *locator, MutableNodeRefList &nodelist) |
Given a valid element key, return the corresponding node list. | |
virtual void | getNodeSetByKey (XalanNode *context, const XalanDOMString &name, const XalanDOMString &ref, const Locator *locator, MutableNodeRefList &nodelist) |
Given a valid element key, return the corresponding node list. | |
virtual const XObjectPtr | getVariable (const XalanQName &name, const Locator *locator=0) |
Given a name, locate a variable in the current context, and return a pointer to the object. | |
virtual const PrefixResolver * | getPrefixResolver () const |
Retrieve the resolver for namespaces. | |
virtual void | setPrefixResolver (const PrefixResolver *thePrefixResolver) |
Change the resolver for namespaces. | |
virtual const XalanDOMString * | getNamespaceForPrefix (const XalanDOMString &prefix) const |
Retrieve the URI corresponding to a namespace prefix. | |
virtual const XalanDOMString & | findURIFromDoc (const XalanDocument *owner) const |
Given a DOM Document, tell what URI was used to parse it. | |
virtual const XalanDOMString & | getUnparsedEntityURI (const XalanDOMString &theName, const XalanDocument &theDocument) const |
The getUnparsedEntityURI function returns the URI of the unparsed entity with the specified name in the same document as the context node (see [3.3 Unparsed Entities]). | |
virtual XalanDocument * | getSourceDocument (const XalanDOMString &theURI) const |
Get the document associated with the given URI. | |
virtual void | setSourceDocument (const XalanDOMString &theURI, XalanDocument *theDocument) |
Associate a document with a given URI. | |
virtual void | formatNumber (double number, const XalanDOMString &pattern, XalanDOMString &theResult, const XalanNode *context=0, const Locator *locator=0) |
Formats a number according to the specified pattern. | |
virtual void | formatNumber (double number, const XalanDOMString &pattern, const XalanDOMString &dfsName, XalanDOMString &theResult, const XalanNode *context=0, const Locator *locator=0) |
Formats a number according to the specified pattern. | |
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. | |
virtual void | problem (eSource source, eClassification classification, const XalanDOMString &msg, const XalanNode *sourceNode) |
Function that is called when a problem event occurs. | |
virtual void | error (const XalanDOMString &msg, const XalanNode *sourceNode=0, const Locator *locator=0) const |
virtual void | warn (const XalanDOMString &msg, const XalanNode *sourceNode=0, const Locator *locator=0) const |
virtual void | message (const XalanDOMString &msg, const XalanNode *sourceNode=0, const Locator *locator=0) const |
virtual bool | shouldStripSourceNode (const XalanText &node) |
Determine if a text node should be stripped from the source tree, as if it weren't there. | |
![]() | |
XPathExecutionContext (MemoryManager &theMemoryManager, XObjectFactory *theXObjectFactory=0) | |
virtual | ~XPathExecutionContext () |
XObjectFactory & | getXObjectFactory () const |
Retrieve the factory object for creating XObjects. | |
![]() | |
ExecutionContext (MemoryManager &theMemoryManager) | |
virtual | ~ExecutionContext () |
bool | hasPreserveOrStripSpaceConditions () const |
MemoryManager & | getMemoryManager () const |
MemoryManager & | getExceptionMemoryManager () const |
![]() | |
ProblemListenerBase () | |
virtual | ~ProblemListenerBase () |
Static Public Member Functions | |
static XPathExecutionContextDefault * | create (MemoryManager &theManager, XalanNode *theCurrentNode=0, const NodeRefListBase *theContextNodeList=0, const PrefixResolver *thePrefixResolver=0) |
![]() | |
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. | |
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. | |
Protected Types | |
enum | { eNodeListCacheListSize = 50 } |
typedef XalanObjectCache< MutableNodeRefList, DefaultCacheCreateFunctorMemMgr< MutableNodeRefList >, DeleteFunctor< MutableNodeRefList >, ClearCacheResetFunctor< MutableNodeRefList > > | NodeListCacheType |
Protected Attributes | |
XPathEnvSupport * | m_xpathEnvSupport |
DOMSupport * | m_domSupport |
CurrentNodeStackType | m_currentNodeStack |
ContextNodeListStackType | m_contextNodeListStack |
const PrefixResolver * | m_prefixResolver |
XalanDOMString | m_currentPattern |
NodeListCacheType | m_nodeListCache |
XalanDOMStringCache | m_stringCache |
ContextNodeListPositionCache | m_cachedPosition |
XalanQNameByValue | m_scratchQName |
![]() | |
XObjectFactory * | m_xobjectFactory |
![]() | |
MemoryManager & | m_memoryManager |
bool | m_hasPreserveOrStripConditions |
Static Protected Attributes | |
static const NodeRefList | s_dummyList |
![]() | |
static const XalanMessages::Codes | s_messageCodes [eSourceCount][eClassificationCount] |
A basic implementation of the class XPathExecutionContext.
Definition at line 64 of file XPathExecutionContextDefault.hpp.
Definition at line 69 of file XPathExecutionContextDefault.hpp.
Definition at line 68 of file XPathExecutionContextDefault.hpp.
Definition at line 365 of file XPathExecutionContextDefault.hpp.
|
protected |
Enumerator | |
---|---|
eNodeListCacheListSize |
Definition at line 367 of file XPathExecutionContextDefault.hpp.
xalanc::XPathExecutionContextDefault::XPathExecutionContextDefault | ( | XPathEnvSupport & | theXPathEnvSupport, |
DOMSupport & | theDOMSupport, | ||
XObjectFactory & | theXObjectFactory, | ||
XalanNode * | theCurrentNode = 0, | ||
const NodeRefListBase * | theContextNodeList = 0, | ||
const PrefixResolver * | thePrefixResolver = 0 ) |
Construct an XPathExecutionContextDefault object.
theXPathEnvSupport | XPathEnvSupport class instance |
theDOMSupport | DOMSupport class instance |
theXobjectFactory | factory class instance for XObjects |
theCurrentNode | current node in the source tree |
theContextNodeList | node list for current context |
thePrefixResolver | pointer to prefix resolver to use |
|
explicit |
Construct an XPathExecutionContextDefault object.
theXPathEnvSupport | XPathEnvSupport class instance |
theXObjectFactory | factory class instance for XObjects |
theCurrentNode | current node in the source tree |
theContextNodeList | node list for current context |
thePrefixResolver | pointer to prefix resolver to use |
|
virtual |
|
virtual |
Borrow a cached MutableNodeRefList instance.
Implements xalanc::XPathExecutionContext.
|
static |
|
virtual |
Create a MutableNodeRefList with the appropriate context.
Implements xalanc::XPathExecutionContext.
|
virtual |
|
virtual |
Determine if an external element is available by resolving a string to a QName.
theName | The name of the element |
locator | A Locator instance for error reporting |
Implements xalanc::XPathExecutionContext.
|
virtual |
Determine if an external element is available.
theQName | The QName of the element |
Implements xalanc::XPathExecutionContext.
|
virtual |
|
virtual |
Handle an extension function.
theNamespace | namespace of function |
functionName | extension function name |
context | The context node |
argVec | vector of arguments to function |
locator | A Locator instance for error reporting |
Implements xalanc::XPathExecutionContext.
|
virtual |
Given a DOM Document, tell what URI was used to parse it.
Needed for relative resolution.
owner | source document |
Implements xalanc::XPathExecutionContext.
|
virtual |
Formats a number according to the specified pattern.
number | the number to be formatted |
pattern | the format pattern |
dfsName | the name of decimal format to use |
theResult | the formatted number |
context | the source node |
locator | the locator |
Implements xalanc::XPathExecutionContext.
|
virtual |
Formats a number according to the specified pattern.
number | the number to be formatted |
pattern | the format pattern |
theResult | the formatted number |
context | the source node |
locator | the locator |
Implements xalanc::XPathExecutionContext.
|
virtual |
Determine if a function is available.
theName | The name of the function |
locator | A Locator instance for error reporting |
Implements xalanc::XPathExecutionContext.
|
virtual |
Determine if a function is available.
theQName | The QName of the function |
Implements xalanc::XPathExecutionContext.
|
virtual |
Get a cached string for temporary use.
Implements xalanc::XPathExecutionContext.
|
virtual |
|
virtual |
Implements xalanc::XPathExecutionContext.
|
virtual |
Implements xalanc::XPathExecutionContext.
|
virtual |
Retrieve the node currently being executed.
Implements xalanc::XPathExecutionContext.
|
virtual |
Retrieve the URI corresponding to a namespace prefix.
prefix | prefix for a namespace |
Implements xalanc::XPathExecutionContext.
|
virtual |
Given a valid element key, return the corresponding node list.
context | context node |
name | name of the key, which must match the 'name' attribute on xsl:key. Will be resolved to a qname using the provided resolver. |
ref | value that must match the value found by the 'match' attribute on xsl:key |
locator | The Locator to use for error reporting. Can be 0. |
nodelist | A node list to contain the nodes found |
Implements xalanc::XPathExecutionContext.
|
virtual |
Given a valid element key, return the corresponding node list.
context | context node |
name | qname of the key, which must match the 'name' attribute on xsl:key |
ref | value that must match the value found by the 'match' attribute on xsl:key |
locator | The Locator to use for error reporting. Can be 0. |
nodelist | A node list to contain the nodes found |
Implements xalanc::XPathExecutionContext.
|
virtual |
Retrieve the resolver for namespaces.
Implements xalanc::XPathExecutionContext.
|
inline |
Get a reference to the scratch QNameByValue instance.
Definition at line 166 of file XPathExecutionContextDefault.hpp.
|
virtual |
Get the document associated with the given URI.
theURI | document URI |
Implements xalanc::XPathExecutionContext.
|
virtual |
The getUnparsedEntityURI function returns the URI of the unparsed entity with the specified name in the same document as the context node (see [3.3 Unparsed Entities]).
It returns the empty string if there is no such entity.
theName | name of entity |
theDocument | document containing entity |
Implements xalanc::XPathExecutionContext.
|
virtual |
Given a name, locate a variable in the current context, and return a pointer to the object.
theName | name of variable |
Implements xalanc::XPathExecutionContext.
|
inline |
Get the XPathEnvSupport instance.
Definition at line 122 of file XPathExecutionContextDefault.hpp.
|
virtual |
Determine if a node is after another node, in document order.
node1 | The first node |
node2 | The second node |
Implements xalanc::XPathExecutionContext.
|
virtual |
|
virtual |
Provides support for XML parsing service.
theManager | The MemoryManager instance to use. |
urlString | location of the XML |
base | base location for URI |
theErrorHandler | An optional ErrorHandler instance for error reporting. |
Implements xalanc::XPathExecutionContext.
|
virtual |
Pop the node list for current context.
Implements xalanc::XPathExecutionContext.
|
virtual |
Reset the node currently being executed.
Implements xalanc::XPathExecutionContext.
|
virtual |
Function that is called when a problem event occurs.
source | Either eXMLParser, eXSLProcessor, or eXPATH. |
classification | Either eMessage, eWarning, or eError. |
locator | The current Locator instance for the stylesheet. Maybe be a null pointer. |
sourceNode | The current source node, if any. |
msg | The error message. |
Implements xalanc::XPathExecutionContext.
|
virtual |
Function that is called when a problem event occurs.
This version assumes location information is already formatted into the message.
source | either eXMLPARSER, eXSLPROCESSOR, or eXPATH |
classification | either eMESSAGE, eERROR or eWARNING |
msg | string message explaining the problem. |
Implements xalanc::XPathExecutionContext.
|
virtual |
Push the node list for current context.
theList | new node list |
Implements xalanc::XPathExecutionContext.
|
virtual |
Change the node currently being executed.
theCurrentNode | new current node |
Implements xalanc::XPathExecutionContext.
|
virtual |
Return a cached string.
theString | The string to release. |
Implements xalanc::XPathExecutionContext.
|
virtual |
Reset the instance.
This must be called before another execution is attempted.
Implements xalanc::XPathExecutionContext.
|
virtual |
Return a previously borrowed MutableNodeRefList instance.
theList | A pointer the to previously borrowed instance. |
Implements xalanc::XPathExecutionContext.
|
inline |
Set the DOMSupport instance.
theDOMSupport | a reference to the instance to use. |
Definition at line 144 of file XPathExecutionContextDefault.hpp.
|
virtual |
Change the resolver for namespaces.
thePrefixResolver | new object for namespace resolution |
Implements xalanc::XPathExecutionContext.
|
virtual |
Associate a document with a given URI.
theURI | document URI |
theDocument | source document |
Implements xalanc::XPathExecutionContext.
|
inline |
Set the XObjectFactory instance.
theFactory | a reference to the instance to use. |
Definition at line 155 of file XPathExecutionContextDefault.hpp.
|
inline |
Set the XPathEnvSupport instance.
theSupport | a reference to the instance to use. |
Definition at line 133 of file XPathExecutionContextDefault.hpp.
|
virtual |
Determine if a text node should be stripped from the source tree, as if it weren't there.
textNode | text node from the source tree |
Implements xalanc::XPathExecutionContext.
|
virtual |
|
mutableprotected |
Definition at line 407 of file XPathExecutionContextDefault.hpp.
|
protected |
Definition at line 397 of file XPathExecutionContextDefault.hpp.
|
protected |
Definition at line 395 of file XPathExecutionContextDefault.hpp.
|
protected |
Definition at line 401 of file XPathExecutionContextDefault.hpp.
|
protected |
Definition at line 393 of file XPathExecutionContextDefault.hpp.
|
protected |
Definition at line 403 of file XPathExecutionContextDefault.hpp.
|
protected |
Definition at line 399 of file XPathExecutionContextDefault.hpp.
|
mutableprotected |
Definition at line 409 of file XPathExecutionContextDefault.hpp.
|
protected |
Definition at line 405 of file XPathExecutionContextDefault.hpp.
|
protected |
Definition at line 391 of file XPathExecutionContextDefault.hpp.
|
staticprotected |
Definition at line 411 of file XPathExecutionContextDefault.hpp.
Copyright © 1999-2020 The Apache Software Foundation. All Rights Reserved.
Generated on Sat Mar 22 2025 18:54:18 for Xalan-C++ API Reference by