Xalan-C++ API Documentation

The Xalan C++ XSL Transformer Version 1.1

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

StylesheetExecutionContext Class Reference

#include <StylesheetExecutionContext.hpp>

Inheritance diagram for StylesheetExecutionContext

Inheritance graph

[legend]
Collaboration diagram for StylesheetExecutionContext:

Collaboration graph

[legend]
List of all members.

Public Types

Public Methods


Member Typedef Documentation

typedef std::vector<TopLevelArg> StylesheetExecutionContext::ParamVectorType
 

typedef XalanAutoPtr<XalanNumberFormat> StylesheetExecutionContext::XalanNumberFormatAutoPtr
 


Member Enumeration Documentation

enum StylesheetExecutionContext::eDummy
 

Enumeration values:
eDefaultXMLIndentAmount  
eDefaultHTMLIndentAmount  


Constructor & Destructor Documentation

StylesheetExecutionContext::StylesheetExecutionContext ( ) [explicit]
 

virtual StylesheetExecutionContext::~StylesheetExecutionContext ( ) [virtual]
 


Member Function Documentation

void StylesheetExecutionContext::addResultAttribute ( const XalanDOMString & aname,
const XalanDOMString & value ) [pure virtual]
 

Add a result attribute to the list of pending attributes.

Parameters:
aname   name of attribute
value   value of attribute

Reimplemented in StylesheetExecutionContextDefault.

virtual void StylesheetExecutionContext::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 from XPathExecutionContext.

Reimplemented in StylesheetExecutionContextDefault.

void StylesheetExecutionContext::beginConstruction ( const KeyDeclaration & keyDeclaration ) [pure virtual]
 

Add KeyDeclaration to construction list.

Parameters:
KeyDeclaration   being constructed

Reimplemented in StylesheetExecutionContextDefault.

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

Borrow a cached MutableNodeRefList instance.

Returns:
A pointer to the instance.

Reimplemented from XPathExecutionContext.

Reimplemented in StylesheetExecutionContextDefault.

virtual ResultTreeFragBase* StylesheetExecutionContext::borrowResultTreeFrag ( ) [pure virtual]
 

Borrow a cached ResultTreeFragBase instance.

Returns:
A pointer to the instance.

Reimplemented from XPathExecutionContext.

Reimplemented in StylesheetExecutionContextDefault.

void StylesheetExecutionContext::characters ( const XalanDOMChar * ch,
unsigned int start,
unsigned int length ) [pure virtual]
 

Receive notification of character data.

The Parser will call this method to report each chunk of character data. SAX parsers may return all contiguous character data in a single chunk, or they may split it into several chunks; however, all of the characters in any single event must come from the same external entity, so that the Locator provides useful information.

The application must not attempt to read from the array outside of the specified range.

Note that some parsers will report whitespace using the ignorableWhitespace() method rather than this one (validating parsers must do so).

Parameters:
ch   pointer to characters from the XML document
start   start position in the array
length   number of characters to read from the array
Exceptions:
SAXException  

Reimplemented in StylesheetExecutionContextDefault.

void StylesheetExecutionContext::charactersRaw ( const XalanDOMChar * ch,
unsigned int start,
unsigned int length ) [pure virtual]
 

Receive notification of character data.

If available, when the disable-output-escaping attribute is used, output raw text without escaping.

Parameters:
ch   pointer to characters from the XML document
start   start position in the array
length   number of characters to read from the array
Exceptions:
SAXException  

Reimplemented in StylesheetExecutionContextDefault.

void StylesheetExecutionContext::clearTopLevelParams ( ) [pure virtual]
 

Reset the vector of top level parameters.

Reimplemented in StylesheetExecutionContextDefault.

void StylesheetExecutionContext::cloneToResultTree ( XalanNode & node,
bool isLiteral,
bool overrideStrip,
bool shouldCloneAttributes ) [pure virtual]
 

Clone an element with or without children.

Parameters:
node   node to clone
isLiteral   true if a literal element
overrideStrip   false if white space stripping should be done
shouldCloneAttributes   true if attributes should be cloned

Reimplemented in StylesheetExecutionContextDefault.

int StylesheetExecutionContext::collationCompare ( const XalanDOMChar * theLHS,
const XalanDOMChar * theRHS ) [pure virtual]
 

Compare two strings using the collation of the current locale.

Parameters:
theLHS   a string to compare
theRHS   a string to compare
Returns:
< 0 if theLHS is before theRHS, 0 if they are equal, or > 0 if theLHS is after theRHS

Reimplemented in StylesheetExecutionContextDefault.

int StylesheetExecutionContext::collationCompare ( const XalanDOMString & theLHS,
const XalanDOMString & theRHS ) [pure virtual]
 

Compare two strings using the collation of the current locale.

Parameters:
theLHS   a string to compare
theRHS   a string to compare
Returns:
< 0 if theLHS is before theRHS, 0 if they are equal, or > 0 if theLHS is after theRHS

Reimplemented in StylesheetExecutionContextDefault.

void StylesheetExecutionContext::comment ( const XalanDOMChar * data ) [pure virtual]
 

Called when a Comment is to be constructed.

Parameters:
data   pointer to comment data
Exceptions:
SAXException  

Reimplemented in StylesheetExecutionContextDefault.

void StylesheetExecutionContext::copyNamespaceAttributes ( const XalanNode & src ) [pure virtual]
 

Add namespace attributes for a node to the list of pending attributes.

Parameters:
src   source node

Reimplemented in StylesheetExecutionContextDefault.

XalanDocument * StylesheetExecutionContext::createDocument ( ) const [pure virtual]
 

Create a new empty document.

Returns:
new document

Reimplemented in StylesheetExecutionContextDefault.

FormatterToDOM * StylesheetExecutionContext::createFormatterToDOM ( XalanDocument * doc,
XalanElement * elem ) [pure virtual]
 

Construct a FormatterToDOM instance.

it will add the DOM nodes to the document fragment.

Parameters:
doc   document for nodes
docFrag   document fragment for nodes, default none
currentElement   current element for nodes, default none

Reimplemented in StylesheetExecutionContextDefault.

FormatterToDOM * StylesheetExecutionContext::createFormatterToDOM ( XalanDocument * doc,
XalanDocumentFragment * docFrag,
XalanElement * currentElement ) [pure virtual]
 

Construct a FormatterToDOM instance.

it will add the DOM nodes to the document fragment.

Parameters:
doc   document for nodes
docFrag   document fragment for nodes, default none
currentElement   current element for nodes, default none

Reimplemented in StylesheetExecutionContextDefault.

FormatterToHTML * StylesheetExecutionContext::createFormatterToHTML ( Writer & writer,
const XalanDOMString & encoding = XalanDOMString(),
const XalanDOMString & mediaType = XalanDOMString(),
const XalanDOMString & doctypeSystem = XalanDOMString(),
const XalanDOMString & doctypePublic = XalanDOMString(),
bool doIndent = true,
int indent = eDefaultHTMLIndentAmount,
const XalanDOMString & version = XalanDOMString(),
const XalanDOMString & standalone = XalanDOMString(),
bool xmlDecl = false ) [pure virtual]
 

Create a new FormatterToHTML instance.

The execution context owns the instance and will delete it when reset.

Parameters:
writer   character output stream to use
encoding   character encoding for the writer
mediaType   media type (MIME content type) of the data
doctypeSystem   system identifier to be used in the document type declaration
doctypePublic   public identifier to be used in the document type declaration
doIndent   true if output is to be indented
indent   number of spaces to indent at each nesting level
version   version of the output method
standalone   true if the XSLT processor should output a standalone document declaration
xmlDecl   true if the XSLT processor should output an XML declaration
Returns:
a pointer to the new instance.

Reimplemented in StylesheetExecutionContextDefault.

FormatterToText * StylesheetExecutionContext::createFormatterToText ( Writer & writer,
const XalanDOMString & encoding ) [pure virtual]
 

FormatterToText instance constructor.

Parameters:
writer   writer for output
encoding   character encoding for the writer

Reimplemented in StylesheetExecutionContextDefault.

FormatterToXML * StylesheetExecutionContext::createFormatterToXML ( Writer & writer,
const XalanDOMString & version = XalanDOMString(),
bool doIndent = false,
int indent = eDefaultXMLIndentAmount,
const XalanDOMString & encoding = XalanDOMString(),
const XalanDOMString & mediaType = XalanDOMString(),
const XalanDOMString & doctypeSystem = XalanDOMString(),
const XalanDOMString & doctypePublic = XalanDOMString(),
bool xmlDecl = true,
const XalanDOMString & standalone = XalanDOMString() ) [pure virtual]
 

Create a new FormatterToXML instance.

The execution context owns the instance and will delete it when reset.

Parameters:
writer   character output stream to use
version   version of the output method
doIndent   true if output is to be indented
indent   number of spaces to indent at each nesting level
encoding   character encoding for the writer
mediaType   media type (MIME content type) of the data
doctypeSystem   system identifier to be used in the document type declaration
doctypePublic   public identifier to be used in the document type declaration
xmlDecl   true if the XSLT processor should output an XML declaration
standalone   true if the XSLT processor should output a standalone document declaration
Returns:
a pointer to the new instance.

Reimplemented in StylesheetExecutionContextDefault.

const XPath * StylesheetExecutionContext::createMatchPattern ( const XalanDOMString & str,
const PrefixResolver & resolver ) [pure virtual]
 

Create and initialize an xpath and return it.

This is to be used to create an XPath that is only used during execution.

Parameters:
str   string expression for XPath evaluation
resolver   resolver for namespace resolution
Returns:
pointer to resulting XPath

Reimplemented in StylesheetExecutionContextDefault.

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

Create a MutableNodeRefList with the appropriate context.

Returns:
pointer to node list created

Reimplemented from XPathExecutionContext.

Reimplemented in StylesheetExecutionContextDefault.

virtual XObjectPtr StylesheetExecutionContext::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 from XPathExecutionContext.

Reimplemented in StylesheetExecutionContextDefault.

PrintWriter * StylesheetExecutionContext::createPrintWriter ( std::ostream & theStream ) [pure virtual]
 

Create a PrintWriter using the provided ostream instance.

Parameters:
ostream   The output stream for the PrintWriter.
Returns:
The new instance.

Reimplemented in StylesheetExecutionContextDefault.

PrintWriter * StylesheetExecutionContext::createPrintWriter ( const XalanDOMString & theFileName,
const XalanDOMString & theEncoding ) [pure virtual]
 

Create a PrintWriter.

Create an appropriate output stream using the provided file name and encoding.

Parameters:
theFileName   The file name for the output stream
theEncoding   The encoding for the output stream
Returns:
The new instance.

Reimplemented in StylesheetExecutionContextDefault.

PrintWriter * StylesheetExecutionContext::createPrintWriter ( XalanOutputStream * theTextOutputStream ) [pure virtual]
 

Create a PrintWriter for the provided stream.

Parameters:
theTextOutputStream   The output stream for the PrintWriter.
Returns:
The new instance.

Reimplemented in StylesheetExecutionContextDefault.

const XObjectPtr StylesheetExecutionContext::createVariable ( const ElemTemplateElement * element,
const ElemTemplateElement & templateChild,
XalanNode * sourceTree,
XalanNode * sourceNode,
const QName & mode ) [pure virtual]
 

Create an ResultTreeFragment as a variable and push it on to the stack with the current context.

Parameters:
name   name of variable
element   element marker for variable
templateChild   result tree fragment to use.
sourceTree   node for source tree
sourceNode   source node
Returns:
a pointer to the XObject result

Reimplemented in StylesheetExecutionContextDefault.

const XObjectPtr StylesheetExecutionContext::createVariable ( const ElemTemplateElement * element,
const XPath & xpath,
XalanNode * contextNode,
const PrefixResolver & resolver ) [pure virtual]
 

Execute the supplied XPath and and create a variable in the current context.

Parameters:
element   element marker for variable
str   string expression for XPath evaluation
contextNode   current node in the source tree
resolver   resolver for namespace resolution
Returns:
a pointer to the XObject result

Reimplemented in StylesheetExecutionContextDefault.

const XObjectPtr StylesheetExecutionContext::createXResultTreeFrag ( const ElemTemplateElement & templateChild,
XalanNode * sourceTree,
XalanNode * sourceNode,
const QName & mode ) [pure virtual]
 

Create an XObject that represents a Result tree fragment.

Parameters:
templateChild   result tree fragment to use.
sourceTree   node for source tree
sourceNode   source node
mode   current mode
Returns:
XObject instance

Reimplemented in StylesheetExecutionContextDefault.

const XObjectPtr StylesheetExecutionContext::createXResultTreeFrag ( const ElemTemplateElement & templateChild,
XalanNode * sourceTree,
XalanNode * sourceNode ) [pure virtual]
 

Create an XObject that represents a Result tree fragment.

Parameters:
templateChild   result tree fragment to use.
sourceTree   node for source tree
sourceNode   source node
Returns:
XObject instance

Reimplemented in StylesheetExecutionContextDefault.

XalanNumberFormatAutoPtr StylesheetExecutionContext::createXalanNumberFormat ( ) [pure virtual]
 

Create a new XalanNumberFormat instance.

Returns:
an XalanNumberFormatAutoPtr that owns a new XalanNumberFormat instance.

Reimplemented in StylesheetExecutionContextDefault.

void StylesheetExecutionContext::diag ( const XalanDOMString & theString ) [pure virtual]
 

Print a diagnostics string to the output device.

Parameters:
theString   string to print

Reimplemented in StylesheetExecutionContextDefault.

void StylesheetExecutionContext::displayDuration ( const XalanDOMString & theMessage,
const void * theKey ) [pure virtual]
 

Display the duration since pushTime was called.

Parameters:
theMessage   message to display
theKey   key for which duration is displayed

Reimplemented in StylesheetExecutionContextDefault.

bool StylesheetExecutionContext::doDiagnosticsOutput ( ) const [pure virtual]
 

Whether diagnostic output is to be generated.

Returns:
true for diagnostics output

Reimplemented in StylesheetExecutionContextDefault.

virtual bool StylesheetExecutionContext::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 from XPathExecutionContext.

Reimplemented in StylesheetExecutionContextDefault.

void StylesheetExecutionContext::endConstruction ( const KeyDeclaration & keyDeclaration ) [pure virtual]
 

Remove KeyDeclaration from construction list.

Parameters:
constructed   KeyDeclaration

Reimplemented in StylesheetExecutionContextDefault.

void StylesheetExecutionContext::endDocument ( ) [pure virtual]
 

Receive notification of the end of a document.

The SAX parser will invoke this method only once, and it will be the last method invoked during the parse. The parser shall not invoke this method until it has either abandoned parsing (because of an unrecoverable error) or reached the end of input.

Exceptions:
SAXException  

Reimplemented in StylesheetExecutionContextDefault.

void StylesheetExecutionContext::endElement ( const XalanDOMChar * name ) [pure virtual]
 

Receive notification of the end of an element.

The SAX parser will invoke this method at the end of every element in the XML document; there will be a corresponding startElement() event for every endElement() event (even when the element is empty).

If the element name has a namespace prefix, the prefix will still be attached to the name.

Parameters:
name   element type name
Exceptions:
SAXException  

Reimplemented in StylesheetExecutionContextDefault.

virtual void StylesheetExecutionContext::error ( const char * 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 XPathExecutionContext.

Reimplemented in StylesheetExecutionContextDefault.

virtual void StylesheetExecutionContext::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 XPathExecutionContext.

Reimplemented in StylesheetExecutionContextDefault.

const XalanDOMString StylesheetExecutionContext::evaluateAttrVal ( XalanNode * contextNode,
const PrefixResolver & namespaceContext,
const XalanDOMString & stringedValue ) [pure virtual]
 

Evaluate the value of an attribute within the context of a specified context node and namespace.

Parameters:
contextNode   current context node
namespaceContext   context for namespace resolution
stringedValue   value to evaluate

Reimplemented in StylesheetExecutionContextDefault.

const XObjectPtr StylesheetExecutionContext::executeXPath ( const XalanDOMString & str,
XalanNode * contextNode,
const XalanElement & resolver ) [pure virtual]
 

Execute an XPath and return the resulting XObject.

The lifetime of this XObject is not necessarily that of the Stylesheet.

Parameters:
str   string expression for XPath evaluation
contextNode   current node in the source tree
resolver   resolver for namespace resolution
Returns:
pointer to resulting XObject

Reimplemented in StylesheetExecutionContextDefault.

virtual const XObjectPtr StylesheetExecutionContext::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 from XPathExecutionContext.

Reimplemented in StylesheetExecutionContextDefault.

bool StylesheetExecutionContext::findOnElementRecursionStack ( const ElemTemplateElement * theElement ) const [pure virtual]
 

Determine if an element is on the recursion stack.

Returns:
true if element on stack

Reimplemented in StylesheetExecutionContextDefault.

virtual XalanDOMString StylesheetExecutionContext::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 from XPathExecutionContext.

Reimplemented in StylesheetExecutionContextDefault.

void StylesheetExecutionContext::fireGenerateEvent ( const GenerateEvent & ge ) [pure virtual]
 

Fire a generate event.

Parameters:
ge   generate event to fire

Reimplemented in StylesheetExecutionContextDefault.

void StylesheetExecutionContext::fireSelectEvent ( const SelectionEvent & se ) [pure virtual]
 

Fire a selection event.

Parameters:
se   selection event to fire

Reimplemented in StylesheetExecutionContextDefault.

void StylesheetExecutionContext::fireTraceEvent ( const TracerEvent & te ) [pure virtual]
 

Fire a trace event.

Parameters:
te   trace event to fire

Reimplemented in StylesheetExecutionContextDefault.

void StylesheetExecutionContext::flushPending ( ) [pure virtual]
 

Flush the pending element.

Reimplemented in StylesheetExecutionContextDefault.

virtual bool StylesheetExecutionContext::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 from XPathExecutionContext.

Reimplemented in StylesheetExecutionContextDefault.

virtual XalanDOMString& StylesheetExecutionContext::getCachedString ( ) [pure virtual]
 

Reimplemented from XPathExecutionContext.

Reimplemented in StylesheetExecutionContextDefault.

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

Retrieve node list for current context.

Returns:
node list

Reimplemented from XPathExecutionContext.

Reimplemented in StylesheetExecutionContextDefault.

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

Reimplemented from XPathExecutionContext.

Reimplemented in StylesheetExecutionContextDefault.

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

Reimplemented from XPathExecutionContext.

Reimplemented in StylesheetExecutionContextDefault.

CountersTable & StylesheetExecutionContext::getCountersTable ( ) [pure virtual]
 

Get the counters table, which is a table of cached results that is used by ElemNumber.

Returns:
A reference to the counters table.

Reimplemented in StylesheetExecutionContextDefault.

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

Retrieve the node currently being executed.

Returns:
current node

Reimplemented from XPathExecutionContext.

Reimplemented in StylesheetExecutionContextDefault.

int StylesheetExecutionContext::getCurrentStackFrameIndex ( ) const [pure virtual]
 

Get the top of the stack frame from where a search for a variable or param should take place.

Returns:
current value of index

Reimplemented in StylesheetExecutionContextDefault.

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

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

Returns:
DOM document

Reimplemented from XPathExecutionContext.

Reimplemented in StylesheetExecutionContextDefault.

virtual const XalanDecimalFormatSymbols* StylesheetExecutionContext::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 from XPathExecutionContext.

Reimplemented in StylesheetExecutionContextDefault.

FormatterListener * StylesheetExecutionContext::getFormatterListener ( ) const [pure virtual]
 

Get the current formatter listener.

Returns:
pointer to formatter listener

Reimplemented in StylesheetExecutionContextDefault.

bool StylesheetExecutionContext::getInConstruction ( const KeyDeclaration & keyDeclaration ) const [pure virtual]
 

Determine if a KeyDeclaration is being constructed.

Parameters:
The   KeyDeclaration in question.
Returns:
true if being constructed

Reimplemented in StylesheetExecutionContextDefault.

int StylesheetExecutionContext::getIndent ( ) const [pure virtual]
 

Retrieve the current number of spaces to indent.

Returns:
number of spaces

Reimplemented in StylesheetExecutionContextDefault.

virtual const XalanDOMString& StylesheetExecutionContext::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 from XPathExecutionContext.

Reimplemented in StylesheetExecutionContextDefault.

virtual void StylesheetExecutionContext::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 from XPathExecutionContext.

Reimplemented in StylesheetExecutionContextDefault.

const XObjectPtr StylesheetExecutionContext::getParamVariable ( const QName & theName ) [pure virtual]
 

Given a name, return a string representing the value, but don't look in the global space.

Parameters:
theName   name of variable
Returns:
pointer to XObject for variable

Reimplemented in StylesheetExecutionContextDefault.

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

Retrieve the resolver for namespaces.

Returns:
object for namespace resolution

Reimplemented from XPathExecutionContext.

Reimplemented in StylesheetExecutionContextDefault.

bool StylesheetExecutionContext::getQuietConflictWarnings ( ) const [pure virtual]
 

Determine whether conflicts should be reported.

Returns:
true if conflicts should not be warned

Reimplemented in StylesheetExecutionContextDefault.

const XalanDOMString & StylesheetExecutionContext::getResultNamespaceForPrefix ( const XalanDOMString & thePrefix ) const [pure virtual]
 

Retrieve the result namespace corresponding to a prefix.

Parameters:
thePrefix   prefix for namespace

Reimplemented in StylesheetExecutionContextDefault.

const XalanDOMString & StylesheetExecutionContext::getResultPrefixForNamespace ( const XalanDOMString & theNamespace ) const [pure virtual]
 

Retrieve the result prefix corresponding to a namespace.

Parameters:
theNamespace   namespace for prefix

Reimplemented in StylesheetExecutionContextDefault.

XalanNode * StylesheetExecutionContext::getRootDocument ( ) const [pure virtual]
 

Retrieve root document for stylesheet.

Note that this does not have to be a XalanDocument -- it can be any node in a document.

Returns:
root document

Reimplemented in StylesheetExecutionContextDefault.

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

Reimplemented from XPathExecutionContext.

Reimplemented in StylesheetExecutionContextDefault.

virtual bool StylesheetExecutionContext::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 from XPathExecutionContext.

Reimplemented in StylesheetExecutionContextDefault.

unsigned long StylesheetExecutionContext::getTraceListeners ( ) const [pure virtual]
 

Determine the number of trace listeners.

Returns:
number of listeners

Reimplemented in StylesheetExecutionContextDefault.

bool StylesheetExecutionContext::getTraceSelects ( ) const [pure virtual]
 

If this is set to true, simple traces of template calls are made.

Returns:
true if traces made

Reimplemented in StylesheetExecutionContextDefault.

void StylesheetExecutionContext::getUniqueNamespaceValue ( XalanDOMString & theValue ) const [pure virtual]
 

Generate a random namespace prefix guaranteed to be unique.

Parameters:
theValue   A string for returning the new prefix

Reimplemented in StylesheetExecutionContextDefault.

XalanDOMString StylesheetExecutionContext::getUniqueNamespaceValue ( ) const [pure virtual]
 

Generate a random namespace prefix guaranteed to be unique.

Returns:
unique namespace prefix

Reimplemented in StylesheetExecutionContextDefault.

virtual const XalanDOMString& StylesheetExecutionContext::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 from XPathExecutionContext.

Reimplemented in StylesheetExecutionContextDefault.

virtual const XObjectPtr StylesheetExecutionContext::getVariable ( const QName & name ) [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 from XPathExecutionContext.

Reimplemented in StylesheetExecutionContextDefault.

virtual XLocator* StylesheetExecutionContext::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 from XPathExecutionContext.

Reimplemented in StylesheetExecutionContextDefault.

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

Retrieve the factory object for creating XObjects.

Returns:
factory object instance

Reimplemented from XPathExecutionContext.

Reimplemented in StylesheetExecutionContextDefault.

const XalanDOMString & StylesheetExecutionContext::getXSLNameSpaceURL ( ) const [pure virtual]
 

Determine the full XSLT Namespace URI.

Returns:
Xalan namespace URI

Reimplemented in StylesheetExecutionContextDefault.

const XalanDOMString & StylesheetExecutionContext::getXalanXSLNameSpaceURL ( ) const [pure virtual]
 

Special Xalan namespace for built-in extensions.

Returns:
Xalan namespace for extensions

Reimplemented in StylesheetExecutionContextDefault.

bool StylesheetExecutionContext::isElementPending ( ) const [pure virtual]
 

See if there is an element pending.

Reimplemented in StylesheetExecutionContextDefault.

virtual bool StylesheetExecutionContext::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 from XPathExecutionContext.

Reimplemented in StylesheetExecutionContextDefault.

virtual void StylesheetExecutionContext::message ( const char * 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 XPathExecutionContext.

Reimplemented in StylesheetExecutionContextDefault.

virtual void StylesheetExecutionContext::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 XPathExecutionContext.

Reimplemented in StylesheetExecutionContextDefault.

void StylesheetExecutionContext::outputResultTreeFragment ( const XObject & theTree ) [pure virtual]
 

Given a result tree fragment, walk the tree and output it to the result stream.

Parameters:
theTree   result tree fragment

Reimplemented in StylesheetExecutionContextDefault.

void StylesheetExecutionContext::outputToResultTree ( const XObject & xobj ) [pure virtual]
 

Output an object to the result tree by doing the right conversions.

This is public for access by extensions.

Parameters:
obj   the XObject to output

Reimplemented in StylesheetExecutionContextDefault.

virtual XalanDocument* StylesheetExecutionContext::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 from XPathExecutionContext.

Reimplemented in StylesheetExecutionContextDefault.

void StylesheetExecutionContext::popContextMarker ( ) [pure virtual]
 

Pop the current context from the current context stack.

Reimplemented in StylesheetExecutionContextDefault.

void StylesheetExecutionContext::popElementFrame ( const ElemTemplateElement * elem ) [pure virtual]
 

Pop a frame marker for an element.

Parameters:
elem   the element

Reimplemented in StylesheetExecutionContextDefault.

const ElemTemplateElement * StylesheetExecutionContext::popElementRecursionStack ( ) [pure virtual]
 

Pop an element off the recursion stack.

Returns:
pointer to element popped

Reimplemented in StylesheetExecutionContextDefault.

virtual void StylesheetExecutionContext::popOutputContext ( ) [pure virtual]
 

Reimplemented in StylesheetExecutionContextDefault.

void StylesheetExecutionContext::processingInstruction ( const XalanDOMChar * target,
const XalanDOMChar * data ) [pure virtual]
 

Receive notification of a processing instruction.

The Parser will invoke this method once for each processing instruction found: note that processing instructions may occur before or after the main document element.

A SAX parser should never report an XML declaration (XML 1.0, section 2.8) or a text declaration (XML 1.0, section 4.3.1) using this method.

Parameters:
target   processing instruction target
data   processing instruction data, or null if none was supplied
Exceptions:
SAXException  

Reimplemented in StylesheetExecutionContextDefault.

void StylesheetExecutionContext::pushContextMarker ( ) [pure virtual]
 

Push a context marker onto the stack to let us know when to stop searching for a var.

Reimplemented in StylesheetExecutionContextDefault.

void StylesheetExecutionContext::pushElementFrame ( const ElemTemplateElement * elem ) [pure virtual]
 

Push a frame marker for an element.

Parameters:
elem   the element

Reimplemented in StylesheetExecutionContextDefault.

void StylesheetExecutionContext::pushOnElementRecursionStack ( const ElemTemplateElement * theElement ) [pure virtual]
 

Push an element onto the recursion stack.

Parameters:
theElement   pointer to element to push

Reimplemented in StylesheetExecutionContextDefault.

virtual void StylesheetExecutionContext::pushOutputContext ( FormatterListener * flistener = 0 ) [pure virtual]
 

Reimplemented in StylesheetExecutionContextDefault.

void StylesheetExecutionContext::pushParams ( const ElemTemplateElement & xslCallTemplateElement,
XalanNode * sourceTree,
XalanNode * sourceNode,
const QName & mode,
const ElemTemplateElement * targetTemplate ) [pure virtual]
 

Given a template, search for the arguments and push them on the stack.

Also, push default arguments on the stack.

Parameters:
xslCallTemplateElement   "call-template" element
sourceTree   source tree
sourceNode   source node
mode   mode under which the template is operating
targetTemplate   target template

Reimplemented in StylesheetExecutionContextDefault.

void StylesheetExecutionContext::pushTime ( const void * theKey ) [pure virtual]
 

Mark the time, so that displayDuration can later display the elapsed clock ticks.

Parameters:
theKey   element to push

Reimplemented in StylesheetExecutionContextDefault.

void StylesheetExecutionContext::pushTopLevelVariables ( const ParamVectorType & topLevelParams ) [pure virtual]
 

Set a list of top level variables in the specified execution context stylesheet.

Parameters:
topLevelParams   list of top level parameters

Reimplemented in StylesheetExecutionContextDefault.

void StylesheetExecutionContext::pushVariable ( const QName & name,
const ElemVariable * var,
const ElemTemplateElement * element ) [pure virtual]
 

Push a named variable onto the processor variable stack The variable will be evaluated when first referenced.

Parameters:
name   name of variable
var   pointer to ElemVariable instance
element   element marker for variable

Reimplemented in StylesheetExecutionContextDefault.

void StylesheetExecutionContext::pushVariable ( const QName & name,
const XObjectPtr val,
const ElemTemplateElement * element ) [pure virtual]
 

Push a named variable onto the variables stack.

The variable has already been evaluated.

Parameters:
name   name of variable
val   pointer to XObject value
element   element marker for variable

Reimplemented in StylesheetExecutionContextDefault.

void StylesheetExecutionContext::pushVariable ( const QName & name,
const ElemTemplateElement * element,
const ElemTemplateElement & templateChild,
XalanNode * sourceTree,
XalanNode * sourceNode ) [pure virtual]
 

Create an ResultTreeFragment as a variable and push it on to the stack with the current context.

Parameters:
name   name of variable
element   element marker for variable
templateChild   result tree fragment to use.
sourceTree   node for source tree
sourceNode   source node

Reimplemented in StylesheetExecutionContextDefault.

void StylesheetExecutionContext::pushVariable ( const QName & name,
const ElemTemplateElement * element,
const XPath & xpath,
XalanNode * contextNode,
const PrefixResolver & resolver ) [pure virtual]
 

Execute the supplied XPath and push the result as a variable in the current context.

Parameters:
name   name of variable
element   element marker for variable
str   string expression for XPath evaluation
contextNode   current node in the source tree
resolver   resolver for namespace resolution
Returns:
nothing

Reimplemented in StylesheetExecutionContextDefault.

void StylesheetExecutionContext::pushVariable ( const QName & name,
const ElemTemplateElement * element,
const XalanDOMString & str,
XalanNode * contextNode,
const PrefixResolver & resolver ) [pure virtual]
 

Execute an XPath using the provided expression, and push the result as a variable in the context of the supplied element.

Parameters:
name   name of variable
element   element marker for variable
str   string expression for XPath evaluation
contextNode   current node in the source tree
resolver   resolver for namespace resolution
Returns:
nothing

Reimplemented in StylesheetExecutionContextDefault.

virtual bool StylesheetExecutionContext::releaseCachedString ( XalanDOMString & theString ) [pure virtual]
 

Reimplemented from XPathExecutionContext.

Reimplemented in StylesheetExecutionContextDefault.

void StylesheetExecutionContext::replacePendingAttribute ( const XalanDOMChar * theName,
const XalanDOMChar * theNewType,
const XalanDOMChar * theNewValue ) [pure virtual]
 

Replace the contents of a pending attribute.

Parameters:
theName   name of attribute
theNewType   type of attribute
theNewValue   new value of attribute

Reimplemented in StylesheetExecutionContextDefault.

virtual void StylesheetExecutionContext::reset ( ) [pure virtual]
 

Reset the instance.

This must be called before another execution is attempted.

Reimplemented from XPathExecutionContext.

Reimplemented in StylesheetExecutionContextDefault.

void StylesheetExecutionContext::resetCurrentState ( XalanNode * sourceTree,
XalanNode * xmlNode ) [pure virtual]
 

Reset the state of execution to node 'xmlNode' in source tree 'sourceTree.'.

Parameters:
sourceTree   source tree for execution
xmlNode   node to execute

Reimplemented in StylesheetExecutionContextDefault.

void StylesheetExecutionContext::resolveTopLevelParams ( ) [pure virtual]
 

Resolve the params that were pushed by the caller.

Reimplemented in StylesheetExecutionContextDefault.

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

Return a previously borrowed MutableNodeRefList instance.

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

Reimplemented from XPathExecutionContext.

Reimplemented in StylesheetExecutionContextDefault.

virtual bool StylesheetExecutionContext::returnResultTreeFrag ( ResultTreeFragBase * theResultTreeFragBase ) [pure virtual]
 

Return a previously borrowed ResultTreeFragBase instance.

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

Reimplemented from XPathExecutionContext.

Reimplemented in StylesheetExecutionContextDefault.

void StylesheetExecutionContext::returnXPath ( const XPath * xpath ) [pure virtual]
 

Return the XPath created by createMatchPattern().

Parameters:
xpath   The XPath to return.

Reimplemented in StylesheetExecutionContextDefault.

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

Set node list for current context.

Parameters:
theList   new node list

Reimplemented from XPathExecutionContext.

Reimplemented in StylesheetExecutionContextDefault.

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

Change the node currently being executed.

Parameters:
theCurrentNode   new current node

Reimplemented from XPathExecutionContext.

Reimplemented in StylesheetExecutionContextDefault.

void StylesheetExecutionContext::setCurrentStackFrameIndex ( int currentStackFrameIndex = -1 ) [pure virtual]
 

Set the top of the stack frame from where a search for a variable or param should take place.

Parameters:
currentStackFrameIndex   new value of index

Reimplemented in StylesheetExecutionContextDefault.

void StylesheetExecutionContext::setFormatterListener ( FormatterListener * flistener ) [pure virtual]
 

Set the current formatter listener.

Parameters:
flistener   pointer to new formatter listener

Reimplemented in StylesheetExecutionContextDefault.

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

Change the resolver for namespaces.

Parameters:
thePrefixResolver   new object for namespace resolution

Reimplemented from XPathExecutionContext.

Reimplemented in StylesheetExecutionContextDefault.

void StylesheetExecutionContext::setRootDocument ( XalanNode * theDocument ) [pure virtual]
 

Set root document for stylesheet.

Note that this does not have to be a XalanDocument -- it can be any node in a document.

Parameters:
theDocument   root document

Reimplemented in StylesheetExecutionContextDefault.

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

Associate a document with a given URI.

Parameters:
theURI   document URI
theDocument   source document

Reimplemented from XPathExecutionContext.

Reimplemented in StylesheetExecutionContextDefault.

void StylesheetExecutionContext::setStylesheetRoot ( const StylesheetRoot * theStylesheet ) [pure virtual]
 

Set root stylesheet for stylesheet.

Parameters:
theStylesheet   root stylesheet

Reimplemented in StylesheetExecutionContextDefault.

virtual void StylesheetExecutionContext::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 from XPathExecutionContext.

Reimplemented in StylesheetExecutionContextDefault.

virtual bool StylesheetExecutionContext::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 from XPathExecutionContext.

Reimplemented in StylesheetExecutionContextDefault.

void StylesheetExecutionContext::startDocument ( ) [pure virtual]
 

Receive notification of the beginning of a document.

The SAX parser will invoke this method only once, before any other methods in this interface or in DTDHandler (except for setDocumentLocator).

Exceptions:
SAXException  

Reimplemented in StylesheetExecutionContextDefault.

void StylesheetExecutionContext::startElement ( const XalanDOMChar * name ) [pure virtual]
 

Receive notification of the beginning of an element.

The Parser will invoke this method at the beginning of every element in the XML document; there will be a corresponding endElement() event for every startElement() event (even when the element is empty). All of the element's content will be reported, in order, before the corresponding endElement() event.

If the element name has a namespace prefix, the prefix will still be attached.

Parameters:
name   element type name
Exceptions:
SAXException  

Reimplemented in StylesheetExecutionContextDefault.

void StylesheetExecutionContext::traceSelect ( const XalanElement & theTemplate,
const NodeRefListBase & nl ) const [pure virtual]
 

Compose a diagnostic trace of the current selection.

Parameters:
theTemplate   current context node
nl   list of selected nodes

Reimplemented in StylesheetExecutionContextDefault.

virtual void StylesheetExecutionContext::warn ( const char * 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 XPathExecutionContext.

Reimplemented in StylesheetExecutionContextDefault.

virtual void StylesheetExecutionContext::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 XPathExecutionContext.

Reimplemented in StylesheetExecutionContextDefault.


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.1
Copyright © 2000, 2001 The Apache Software Foundation. All Rights Reserved.