Xalan-C++ API Documentation

The Xalan-C++ XSL Transformer Version 1.0

Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

XPathExecutionContext Class Reference

#include <XPathExecutionContext.hpp>

Inheritance diagram for XPathExecutionContext:

ExecutionContext StylesheetExecutionContext XPathExecutionContextDefault StylesheetExecutionContextDefault Collaboration diagram for XPathExecutionContext:

List of all members.

Public Types

Public Methods


Detailed Description


Member Typedef Documentation

typedef Function::XObjectArgVectorType XPathExecutionContext::XObjectArgVectorType


Constructor & Destructor Documentation

explicit XPathExecutionContext::XPathExecutionContext ()

virtual XPathExecutionContext::~XPathExecutionContext () [virtual]


Member Function Documentation

void XPathExecutionContext::associateXLocatorToNode ( const XalanNode * node,
XLocator * xlocator) [pure virtual]

Associate an XLocator provider to a node.

This makes the association based on the root of the tree that is the node's parent.

Parameters:
node   node for association
xlocator   locator to associate with node

Reimplemented in StylesheetExecutionContext, StylesheetExecutionContextDefault, and XPathExecutionContextDefault.

MutableNodeRefList * XPathExecutionContext::borrowMutableNodeRefList () [pure virtual]

Borrow a cached MutableNodeRefList.

Returns:
A pointer the to node list.

Reimplemented in StylesheetExecutionContext, StylesheetExecutionContextDefault, and XPathExecutionContextDefault.

MutableNodeRefList * XPathExecutionContext::createMutableNodeRefList () const [pure virtual]

Create a MutableNodeRefList with the appropriate context.

Returns:
pointer to node list created

Reimplemented in StylesheetExecutionContext, StylesheetExecutionContextDefault, and XPathExecutionContextDefault.

XObject * XPathExecutionContext::createNodeSet ( XalanNode & theNode) [pure virtual]

Convenience function for creating a node set with the supplied node as the only member.

Parameters:
node   The node queried
Returns:
a pointer to the XObject instance.

Reimplemented in StylesheetExecutionContext, StylesheetExecutionContextDefault, and XPathExecutionContextDefault.

bool XPathExecutionContext::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 given element is available or not

Reimplemented in StylesheetExecutionContext, StylesheetExecutionContextDefault, and XPathExecutionContextDefault.

virtual void XPathExecutionContext::error ( const XalanDOMString & msg,
const XalanNode * sourceNode = 0,
const XalanNode * styleNode = 0) const [pure virtual]

Tell the user of an error, and probably throw an exception.

Parameters:
msg   text of message to output
sourceNode   node in source where error occurred
styleNode   node in stylesheet where error occurred

Reimplemented from ExecutionContext.

Reimplemented in StylesheetExecutionContext, StylesheetExecutionContextDefault, and XPathExecutionContextDefault.

const XObject * XPathExecutionContext::extFunction ( const XalanDOMString & theNamespace,
const XalanDOMString & functionName,
XalanNode * context,
const XObjectArgVectorType & argVec) [pure virtual]

Handle an extension function.

Parameters:
theNamespace   namespace of function
functionName   extension function name
argVec   vector of arguments to function
Returns:
pointer to XObject result

Reimplemented in StylesheetExecutionContext, StylesheetExecutionContextDefault, and XPathExecutionContextDefault.

XalanDOMString XPathExecutionContext::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

Reimplemented in StylesheetExecutionContext, StylesheetExecutionContextDefault, and XPathExecutionContextDefault.

bool XPathExecutionContext::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

Reimplemented in StylesheetExecutionContext, StylesheetExecutionContextDefault, and XPathExecutionContextDefault.

const NodeRefListBase & XPathExecutionContext::getContextNodeList () const [pure virtual]

Retrieve node list for current context.

Returns:
node list

Reimplemented in StylesheetExecutionContext, StylesheetExecutionContextDefault, and XPathExecutionContextDefault.

virtual unsigned int XPathExecutionContext::getContextNodeListLength () const [pure virtual]

Reimplemented in StylesheetExecutionContext, StylesheetExecutionContextDefault, and XPathExecutionContextDefault.

virtual unsigned int XPathExecutionContext::getContextNodeListPosition ( const XalanNode & contextNode) const [pure virtual]

Reimplemented in StylesheetExecutionContext, StylesheetExecutionContextDefault, and XPathExecutionContextDefault.

XalanNode * XPathExecutionContext::getCurrentNode () const [pure virtual]

Retrieve the node currently being executed.

Returns:
current node

Reimplemented in StylesheetExecutionContext, StylesheetExecutionContextDefault, and XPathExecutionContextDefault.

XalanDOMString XPathExecutionContext::getCurrentPattern () const [pure virtual]

Retrieve the current match pattern.

Returns:
current match pattern

Reimplemented in StylesheetExecutionContext, StylesheetExecutionContextDefault, and XPathExecutionContextDefault.

XalanDocument * XPathExecutionContext::getDOMFactory () const [pure virtual]

Get a DOM document, primarily for creating result tree fragments.

Returns:
DOM document

Reimplemented in StylesheetExecutionContext, StylesheetExecutionContextDefault, and XPathExecutionContextDefault.

const XalanDecimalFormatSymbols * XPathExecutionContext::getDecimalFormatSymbols ( const XalanDOMString & name) [pure virtual]

Retrieve the XalanDecimalFormatSymbols instance associated with the name.

Parameters:
name   the name for the lookup
Returns:
a pointer to the matching instance, or 0 if none was found

Reimplemented in StylesheetExecutionContext, StylesheetExecutionContextDefault, and XPathExecutionContextDefault.

XalanElement * XPathExecutionContext::getElementByID ( const XalanDOMString & id,
const XalanDocument & doc) const [pure virtual]

Given a valid element id, return the corresponding element.

Parameters:
id   string representing ID
doc   document to search
Returns:
element for ID

Reimplemented in StylesheetExecutionContext, StylesheetExecutionContextDefault, and XPathExecutionContextDefault.

XalanDOMString XPathExecutionContext::getLocalNameOfNode ( const XalanNode & n) const [pure virtual]

Returns the local name of the given node.

Parameters:
n   node queried
Returns:
local name string corresponding to 'n'

Reimplemented in StylesheetExecutionContext, StylesheetExecutionContextDefault, and XPathExecutionContextDefault.

XalanDOMString XPathExecutionContext::getNameOfNode ( const XalanNode & n) const [pure virtual]

Retrieve the name of the node, taking into account the differences between the DOM and XSLT data models.

Parameters:
node   DOM node whose name is returned
Returns:
name of the node

Reimplemented in StylesheetExecutionContext, StylesheetExecutionContextDefault, and XPathExecutionContextDefault.

XalanDOMString XPathExecutionContext::getNamespaceForPrefix ( const XalanDOMString & prefix) const [pure virtual]

Retrieve the URI corresponding to a namespace prefix.

Parameters:
prefix   prefix for a namespace
Returns:
URI corresponding to namespace

Reimplemented in StylesheetExecutionContext, StylesheetExecutionContextDefault, and XPathExecutionContextDefault.

XalanDOMString XPathExecutionContext::getNamespaceOfNode ( const XalanNode & n) const [pure virtual]

Retrieve namespace corresponding to a DOM node.

Parameters:
n   DOM node queried
Returns:
namespace string corresponding to 'n'

Reimplemented in StylesheetExecutionContext, StylesheetExecutionContextDefault, and XPathExecutionContextDefault.

XalanDOMString XPathExecutionContext::getNodeData ( const XalanNode & n) const [pure virtual]

Get node data recursively.

(Note whitespace issues.)

Parameters:
n   DOM node queried
Returns:
string of data for node 'n'

Reimplemented in StylesheetExecutionContext, StylesheetExecutionContextDefault, and XPathExecutionContextDefault.

void XPathExecutionContext::getNodeSetByKey ( XalanNode * doc,
const XalanDOMString & name,
const XalanDOMString & ref,
const PrefixResolver & resolver,
MutableNodeRefList & nodelist) [pure virtual]

Given a valid element key, return the corresponding node list.

Parameters:
doc   source document
name   name 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
resolver   resolver for namespace resolution
nodelist   A node list to contain the nodes found

Reimplemented in StylesheetExecutionContext, StylesheetExecutionContextDefault, and XPathExecutionContextDefault.

XalanNode * XPathExecutionContext::getParentOfNode ( const XalanNode & n) const [pure virtual]

Returns the parent of the given node.

Parameters:
n   DOM node queried
Returns:
parent node for 'n'

Reimplemented in StylesheetExecutionContext, StylesheetExecutionContextDefault, and XPathExecutionContextDefault.

const PrefixResolver * XPathExecutionContext::getPrefixResolver () const [pure virtual]

Retrieve the resolver for namespaces.

Returns:
object for namespace resolution

Reimplemented in StylesheetExecutionContext, StylesheetExecutionContextDefault, and XPathExecutionContextDefault.

bool XPathExecutionContext::getProcessNamespaces () const [pure virtual]

Tells if namespaces should be supported.

For optimization purposes.

Returns:
true if namespaces supported

Reimplemented in StylesheetExecutionContext, StylesheetExecutionContextDefault, and XPathExecutionContextDefault.

virtual XalanDocument* XPathExecutionContext::getSourceDocument ( const XalanDOMString & theURI) const [pure virtual]

Reimplemented in StylesheetExecutionContext, StylesheetExecutionContextDefault, and XPathExecutionContextDefault.

bool XPathExecutionContext::getThrowFoundIndex () const [pure virtual]

Tells if FoundIndex should be thrown if index is found.

This is an optimization for match patterns, and is used internally by the XPath engine.

Returns:
true to throw FoundIndex

Reimplemented in StylesheetExecutionContext, StylesheetExecutionContextDefault, and XPathExecutionContextDefault.

XalanDOMString XPathExecutionContext::getUnparsedEntityURI ( const XalanDOMString & theName,
const XalanDocument & theDocument) const [pure 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.

Parameters:
theName   name of entity
theDocument   document containing entity
Returns:
URI for the entity

Reimplemented in StylesheetExecutionContext, StylesheetExecutionContextDefault, and XPathExecutionContextDefault.

const XObject * XPathExecutionContext::getVariable ( const QName & name) const [pure virtual]

Given a name, locate a variable in the current context, and return a pointer to the object.

Parameters:
theName   name of variable
Returns:
pointer to an XObject if the variable was found, 0 if it was not

Reimplemented in StylesheetExecutionContext, StylesheetExecutionContextDefault, and XPathExecutionContextDefault.

XLocator * XPathExecutionContext::getXLocatorFromNode ( const XalanNode * node) const [pure virtual]

Get an XLocator provider keyed by node.

This gets the association based on the root of the tree that is the node's parent.

Parameters:
node   node for locator
Returns:
pointer to locator

Reimplemented in StylesheetExecutionContext, StylesheetExecutionContextDefault, and XPathExecutionContextDefault.

XObjectFactory & XPathExecutionContext::getXObjectFactory () const [pure virtual]

Retrieve the factory object for creating XObjects.

Returns:
factory object instance

Reimplemented in StylesheetExecutionContext, StylesheetExecutionContextDefault, and XPathExecutionContextDefault.

bool XPathExecutionContext::isIgnorableWhitespace ( const XalanText & node) const [pure virtual]

Tell if the node is ignorable whitespace.

This should be in the DOM. Return false if the parser doesn't handle this.

Parameters:
node   text node queried
Returns:
true if white space can be ignored

Reimplemented in StylesheetExecutionContext, StylesheetExecutionContextDefault, and XPathExecutionContextDefault.

bool XPathExecutionContext::isNodeAfter ( const XalanNode & node1,
const XalanNode & node2) const [pure virtual]

Determine if a node is after another node, in document order.

Parameters:
node1   The first node
node2   The second node
Returns:
true if node1 one is after node2, or false if it is not.

Reimplemented in StylesheetExecutionContext, StylesheetExecutionContextDefault, and XPathExecutionContextDefault.

virtual void XPathExecutionContext::message ( const XalanDOMString & msg,
const XalanNode * sourceNode = 0,
const XalanNode * styleNode = 0) const [pure virtual]

Output a message.

Parameters:
msg   text of message to output
sourceNode   node in source where error occurred
styleNode   node in stylesheet where error occurred

Reimplemented from ExecutionContext.

Reimplemented in StylesheetExecutionContext, StylesheetExecutionContextDefault, and XPathExecutionContextDefault.

XalanDocument * XPathExecutionContext::parseXML ( const XalanDOMString & urlString,
const XalanDOMString & base) const [pure virtual]

Provides support for XML parsing service.

Parameters:
urlString   location of the XML
base   base location for URI
Returns:
parsed document

Reimplemented in StylesheetExecutionContext, StylesheetExecutionContextDefault, and XPathExecutionContextDefault.

void XPathExecutionContext::popArgVector () [pure virtual]

Pop the arg vector from the execution context.

Reimplemented in StylesheetExecutionContext, StylesheetExecutionContextDefault, and XPathExecutionContextDefault.

XObjectArgVectorType & XPathExecutionContext::pushArgVector () [pure virtual]

Push an arg vector on the execution context and return a reference to it.

Must be followed by a pop.

Returns:
a reference to an arg vector.

Reimplemented in StylesheetExecutionContext, StylesheetExecutionContextDefault, and XPathExecutionContextDefault.

void XPathExecutionContext::reset () [pure virtual]

Reset the instance.

This must be called before another execution is attempted.

Reimplemented in StylesheetExecutionContext, StylesheetExecutionContextDefault, and XPathExecutionContextDefault.

bool XPathExecutionContext::returnMutableNodeRefList ( MutableNodeRefList * theList) [pure virtual]

Return a previously borrowed MutableNodeRefList.

Parameters:
theList   A pointer the to previously borrowed node list.
Returns:
true if the list was borrowed (at therefore, destroyed), false if not.

Reimplemented in StylesheetExecutionContext, StylesheetExecutionContextDefault, and XPathExecutionContextDefault.

void XPathExecutionContext::setContextNodeList ( const NodeRefListBase & theList) [pure virtual]

Set node list for current context.

Parameters:
theList   new node list

Reimplemented in StylesheetExecutionContext, StylesheetExecutionContextDefault, and XPathExecutionContextDefault.

void XPathExecutionContext::setCurrentNode ( XalanNode * theCurrentNode) [pure virtual]

Change the node currently being executed.

Parameters:
theCurrentNode   new current node

Reimplemented in StylesheetExecutionContext, StylesheetExecutionContextDefault, and XPathExecutionContextDefault.

void XPathExecutionContext::setCurrentPattern ( const XalanDOMString & thePattern) [pure virtual]

Sets the current match pattern.

Parameters:
thePattern   new match pattern

Reimplemented in StylesheetExecutionContext, StylesheetExecutionContextDefault, and XPathExecutionContextDefault.

void XPathExecutionContext::setPrefixResolver ( const PrefixResolver * thePrefixResolver) [pure virtual]

Change the resolver for namespaces.

Parameters:
thePrefixResolver   new object for namespace resolution

Reimplemented in StylesheetExecutionContext, StylesheetExecutionContextDefault, and XPathExecutionContextDefault.

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

Associate a document with a given URI.

Parameters:
theURI   document URI
theDocument   source document

Reimplemented in StylesheetExecutionContext, StylesheetExecutionContextDefault, and XPathExecutionContextDefault.

void XPathExecutionContext::setThrowFoundIndex ( bool fThrow) [pure virtual]

Changes whether FoundIndex should be thrown if index is found.

This is an optimization for match patterns, and is used internally by the XPath engine.

Parameters:
fThrow   true to throw FoundIndex

Reimplemented in StylesheetExecutionContext, StylesheetExecutionContextDefault, and XPathExecutionContextDefault.

bool XPathExecutionContext::shouldStripSourceNode ( const XalanNode & node) [pure virtual]

Tells, through the combination of the default-space attribute on xsl:stylesheet, xsl:strip-space, xsl:preserve-space, and the xml:space attribute, whether or not extra whitespace should be stripped from the node.

Literal elements from template elements should not be tested with this function.

Parameters:
textNode   text node from the source tree
Returns:
true if the text node should be stripped of extra whitespace

Reimplemented in StylesheetExecutionContext, StylesheetExecutionContextDefault, and XPathExecutionContextDefault.

virtual void XPathExecutionContext::warn ( const XalanDOMString & msg,
const XalanNode * sourceNode = 0,
const XalanNode * styleNode = 0) const [pure virtual]

Tell the user of an warning, and probably throw an exception.

Parameters:
msg   text of message to output
sourceNode   node in source where error occurred
styleNode   node in stylesheet where error occurred

Reimplemented from ExecutionContext.

Reimplemented in StylesheetExecutionContext, StylesheetExecutionContextDefault, and XPathExecutionContextDefault.


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

Interpreting class diagrams

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

Xalan-C++ XSL Transformer Version 1.0
Copyright © 2000 The Apache Software Foundation. All Rights Reserved.