18 #if !defined(STYLESHEETEXECUTIONCONTEXT_HEADER_GUARD_1357924680)
19 #define STYLESHEETEXECUTIONCONTEXT_HEADER_GUARD_1357924680
44 #if defined(XALAN_AUTO_PTR_REQUIRES_DEFINITION)
65 XALAN_CPP_NAMESPACE_BEGIN
69 #if defined(XALAN_STRICT_ANSI_HEADERS)
116 #if defined(XALAN_NO_STD_NAMESPACE)
124 MemoryManager& theMemoryManager,
138 getQuietConflictWarnings()
const = 0;
147 getCopyTextNodesOnly()
const = 0;
156 pushCopyTextNodesOnly(
bool copyTextNodesOnly) = 0;
163 popCopyTextNodesOnly() = 0;
177 m_executionContext(executionContext)
184 m_executionContext.popCopyTextNodesOnly();
200 #if !defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
206 pushProcessCurrentAttribute(
bool processAttribute) = 0;
212 popProcessCurrentAttribute() = 0;
220 pushSkipElementAttributes(
bool skipAttributes) = 0;
227 getSkipElementAttributes()
const = 0;
233 popSkipElementAttributes() = 0;
241 pushExecuteIf(
bool executeIf) = 0;
260 getRootDocument()
const = 0;
270 setRootDocument(
XalanNode* theDocument) = 0;
286 getCurrentMode()
const = 0;
294 pushCurrentMode(
const XalanQName* theMode) = 0;
309 getCurrentTemplate()
const = 0;
317 pushCurrentTemplate(
const ElemTemplate* theTemplate) = 0;
320 popCurrentTemplate() = 0;
322 #if defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
327 class PushAndPopCurrentTemplate
331 PushAndPopCurrentTemplate(
334 m_executionContext(executionContext)
339 ~PushAndPopCurrentTemplate()
341 m_executionContext.popCurrentTemplate();
355 isElementPending()
const = 0;
365 replacePendingAttribute(
366 const XalanDOMChar* theName,
367 const XalanDOMChar* theNewType,
368 const XalanDOMChar* theNewValue) = 0;
376 getFormatterListener()
const = 0;
390 popOutputContext() = 0;
405 m_executionContext(theExecutionContext)
407 m_executionContext.pushOutputContext(theNewListener);
412 m_executionContext.popOutputContext();
440 const XalanDOMChar* value) = 0;
448 copyNamespaceAttributes(
const XalanNode& src) = 0;
458 getResultPrefixForNamespace(
const XalanDOMString& theNamespace)
const = 0;
468 getResultNamespaceForPrefix(
const XalanDOMString& thePrefix)
const = 0;
496 getIndent()
const = 0;
504 setIndent(
int indentAmount) = 0;
525 returnXPath(
const XPath* xpath) = 0;
534 const XPath* xpath = 0) :
544 m_context.returnXPath(m_xpath);
557 const XPath*
const temp = m_xpath;
569 m_context.returnXPath(m_xpath);
579 const XPath* m_xpath;
591 pushTopLevelVariables(
const ParamVectorType& topLevelParams) = 0;
608 #if defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
662 #if defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
713 pushContextMarker() = 0;
719 popContextMarker() = 0;
721 #if defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
726 class PushAndPopContextMarker
731 m_executionContext(executionContext)
736 PushAndPopContextMarker(
738 int& currentStackFrameIndex) :
739 m_executionContext(executionContext)
746 ~PushAndPopContextMarker()
748 m_executionContext.popContextMarker();
752 getExecutionContext()
const
754 return m_executionContext;
767 resolveTopLevelParams() = 0;
773 clearTopLevelParams() = 0;
775 #if defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
776 class ResolveAndClearTopLevelParams
781 m_executionContext(executionContext)
783 m_executionContext.resolveTopLevelParams();
786 ~ResolveAndClearTopLevelParams()
788 m_executionContext.clearTopLevelParams();
810 virtual void beginParams() = 0;
815 virtual void endParams() = 0;
836 getParamVariable(
const XalanQName& theName) = 0;
852 popElementFrame() = 0;
854 #if defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
859 class PushAndPopElementFrame
863 PushAndPopElementFrame(
866 m_executionContext(executionContext)
871 ~PushAndPopElementFrame()
873 m_executionContext.popElementFrame();
888 getGlobalStackFrameIndex()
const = 0;
897 getCurrentStackFrameIndex()
const = 0;
906 pushCurrentStackFrameIndex(
int currentStackFrameIndex = -1) = 0;
912 popCurrentStackFrameIndex() = 0;
924 m_executionContext(executionContext),
925 m_savedIndex(executionContext.getCurrentStackFrameIndex())
932 m_executionContext.popCurrentStackFrameIndex();
939 const int m_savedIndex;
942 #if defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
946 class ParamsPushPop :
public PushAndPopContextMarker
953 PushAndPopContextMarker(executionContext)
955 doPush(xslCallTemplateElement);
961 int& savedStackFrameIndex) :
962 PushAndPopContextMarker(executionContext, savedStackFrameIndex)
965 xslCallTemplateElement,
966 savedStackFrameIndex);
978 int stackFrameIndex);
1017 startElement(
const XalanDOMChar* name) = 0;
1025 endElement(
const XalanDOMChar* name) = 0;
1036 const XalanDOMChar* ch,
1038 fl_size_type
length) = 0;
1051 const XalanDOMChar* ch,
1053 fl_size_type
length) = 0;
1061 comment(
const XalanDOMChar* data) = 0;
1070 processingInstruction(
1071 const XalanDOMChar* target,
1072 const XalanDOMChar* data) = 0;
1089 const Locator* locator) = 0;
1105 bool shouldCloneAttributes,
1106 const Locator* locator) = 0;
1108 #if !defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
1114 beginCreateXResultTreeFrag(
1122 endCreateXResultTreeFrag() = 0;
1138 endFormatToText() = 0;
1148 createXResultTreeFrag(
1163 const Locator* locator) = 0;
1173 outputResultTreeFragment(
1175 const Locator* locator) = 0;
1183 getXSLNameSpaceURL()
const = 0;
1191 getXalanXSLNameSpaceURL()
const = 0;
1215 popElementRecursionStack() = 0;
1233 m_executionContext(executionContext)
1235 m_executionContext.pushOnElementRecursionStack(element);
1240 m_executionContext.popElementRecursionStack();
1264 eDefaultXMLIndentAmount = 0,
1265 eDefaultHTMLIndentAmount = 0
1286 getEscapeURLs()
const = 0;
1296 setEscapeURLs(eEscapeURLs value) = 0;
1316 virtual eOmitMETATag
1317 getOmitMETATag()
const = 0;
1327 setOmitMETATag(eOmitMETATag value) = 0;
1351 createFormatterToXML(
1354 bool doIndent =
false,
1355 int indent = eDefaultXMLIndentAmount,
1360 bool xmlDecl =
true,
1381 createFormatterToHTML(
1387 bool doIndent =
true,
1388 int indent = eDefaultHTMLIndentAmount,
1389 bool escapeURLs =
true,
1390 bool omitMetaTag =
false) = 0;
1399 createFormatterToText(
1403 #if defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
1404 class BorrowReturnFormatterToText
1408 BorrowReturnFormatterToText(
1411 bool normalizeLinefeed =
true,
1412 bool handleIgnorableWhitespace =
true);
1414 ~BorrowReturnFormatterToText()
1416 assert(m_formatter != 0);
1418 m_executionContext.returnFormatterToText(m_formatter);
1424 assert(m_formatter != 0);
1426 return *m_formatter;
1432 assert(m_formatter != 0);
1451 friend class BorrowReturnFormatterToText;
1454 #if !defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
1459 getNodeSorter() = 0;
1468 borrowNodeSorter() = 0;
1479 class BorrowReturnNodeSorter
1484 m_executionContext(executionContext),
1485 m_sorter(executionContext.borrowNodeSorter())
1487 assert(m_sorter != 0);
1490 ~BorrowReturnNodeSorter()
1492 assert(m_sorter != 0);
1494 m_executionContext.returnNodeSorter(m_sorter);
1500 assert(m_sorter != 0);
1508 assert(m_sorter != 0);
1535 virtual XalanNumberFormatAutoPtr
1536 createXalanNumberFormat() = 0;
1538 #if !defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
1546 attributeSetNameIndex(0),
1547 matchingAttributeSetIndex(0) {}
1556 createUseAttributeSetIndexesOnStack() = 0;
1559 getUseAttributeSetIndexes() = 0;
1562 popUseAttributeSetIndexesFromStack() = 0;
1584 getInvoker()
const = 0;
1592 virtual tl_size_type
1593 getTraceListeners()
const = 0;
1625 getTraceSelects()
const = 0;
1638 const XPath* xpath) = 0;
1683 const XalanDOMChar* theLHS,
1684 const XalanDOMChar* theRHS,
1699 const XalanDOMChar* theLHS,
1700 const XalanDOMChar* theRHS,
1701 const XalanDOMChar* theLocale,
1733 createPrintWriter(StreamType& theStream) = 0;
1742 createPrintWriter(FILE* theStream) = 0;
1751 getCountersTable() = 0;
1776 charactersRaw(
const XalanNode& node) = 0;
1784 charactersRaw(
const XObjectPtr& xobject) = 0;
1843 const Locator* locator)
const = 0;
1866 const Locator* locator)
const = 0;
1874 const Locator* locator) = 0;
1878 MemoryManager& theManager,
1881 ErrorHandler* theErrorHandler = 0)
const = 0;
1892 #if !defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
1895 createAndPushMutableNodeRefList() = 0;
1898 releaseAndPopMutableNodeRefList() = 0;
1901 pushXObjectPtr(
const XObjectPtr& xobjectPtr) = 0;
1904 popXObjectPtr() = 0;
1907 createAndPushNodesToTransformList(
const NodeRefListBase* nodeList) = 0;
1910 getNextNodeToTransform() = 0;
1913 popNodesToTransformList() = 0;
1920 getAndPushCachedString() = 0;
1927 getLastCachedString() = 0;
1937 getAndPopCachedString() = 0;
1952 const Locator* locator,
1960 const Locator* locator,
1966 const Locator* locator = 0) = 0;
2002 const Locator* locator = 0) = 0;
2011 const Locator* locator = 0) = 0;
2020 const Locator* locator,
2030 #if defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
2038 borrowFormatterToText() = 0;
2053 XALAN_CPP_NAMESPACE_END
2057 #endif // STYLESHEETEXECUTIONCONTEXT_HEADER_GUARD_1357924680
virtual void setPrefixResolver(const PrefixResolver *thePrefixResolver)=0
Change the resolver for namespaces.
virtual void pushContextNodeList(const NodeRefListBase &theList)=0
Push the node list for current context.
virtual MutableNodeRefList * borrowMutableNodeRefList()=0
Borrow a cached MutableNodeRefList instance.
virtual bool shouldStripSourceNode(const XalanText &node)=0
Determine if a text node should be stripped from the source tree, as if it weren't there...
SetAndRestoreCopyTextNodesOnly(StylesheetExecutionContext &executionContext, bool fValue)
virtual bool returnMutableNodeRefList(MutableNodeRefList *theList)=0
Return a previously borrowed MutableNodeRefList instance.
Local implementation of MutableNodeRefList.
XPathGuard(StylesheetExecutionContext &context, const XPath *xpath=0)
ElementRecursionStackPusher(StylesheetExecutionContext &executionContext, const ElemTemplateElement *element)
Construct an instance of the recursion stack pusher.
virtual const XObjectPtr getVariable(const XalanQName &name, const Locator *locator=0)=0
Given a name, locate a variable in the current context, and return a pointer to the object...
XalanVector< TopLevelArg > ParamVectorType
virtual void pushCurrentTemplate(const ElemTemplate *theTemplate)=0
Set the current template.
This is a table of counters, keyed by ElemNumber objects...
~SetAndRestoreCopyTextNodesOnly()
virtual void pushCopyTextNodesOnly(bool copyTextNodesOnly)=0
Set the flag that determines if only text nodes can be copied to the result tree. ...
void reset(const XPath *xpath)
virtual const PrefixResolver * getPrefixResolver() const =0
Retrieve the resolver for namespaces.
virtual void pushElementFrame(const ElemTemplateElement *elem)=0
Push a frame marker for an element.
virtual const NodeRefListBase & getContextNodeList() const =0
Get the node list for current context.
virtual void pushCurrentNode(XalanNode *theCurrentNode)=0
Change the node currently being executed.
XalanMemMgrAutoPtr< XalanNumberFormat > XalanNumberFormatAutoPtr
virtual void reset()=0
Reset the instance.
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.
This acts as the stylesheet root of the stylesheet tree, and holds values that are shared by all styl...
virtual const XObjectPtr extFunction(const XalanDOMString &theNamespace, const XalanDOMString &functionName, XalanNode *context, const XObjectArgVectorType &argVec, const Locator *locator)=0
Handle an extension function.
virtual bool releaseCachedString(XalanDOMString &theString)=0
Return a cached string.
virtual int getCurrentStackFrameIndex() const =0
Get the top of the stack frame from where a search for a variable or param should take place...
Class to hold XObjectPtr return types.
eOmitMETATag
Enums to determine whether or not run-time omission of the META tag has been set. ...
size_type matchingAttributeSetIndex
This is the class for events generated by the XSL processor after it generates a new node in the resu...
Class for keeping track of elements pushed on the element recursion stack.
SetAndRestoreCurrentStackFrameIndex(StylesheetExecutionContext &executionContext, int newIndex)
Local implementation of NodeRefList.
virtual void setSourceDocument(const XalanDOMString &theURI, XalanDocument *theDocument)=0
Associate a document with a given URI.
~SetAndRestoreCurrentStackFrameIndex()
virtual void popCurrentNode()=0
Reset the node currently being executed.
static MemoryManager & getDummyMemMgr()
virtual size_type getContextNodeListLength() const =0
virtual XalanDocument * getSourceDocument(const XalanDOMString &theURI) const =0
Get the document associated with the given URI.
virtual bool isNodeAfter(const XalanNode &node1, const XalanNode &node2) const =0
Determine if a node is after another node, in document order.
OutputContextPushPop(StylesheetExecutionContext &theExecutionContext, FormatterListener *theNewListener=0)
Construct an object to push and pop the current output context.
virtual void popContextNodeList()=0
Pop the node list for current context.
collationCompare(const XalanDOMChar *theLHS, XalanDOMString::size_type theLHSLength, const XalanDOMChar *theRHS, XalanDOMString::size_type theRHSLength)
Compare the contents of two character arrays.
FormatterListener::size_type fl_size_type
eEscapeURLs
Enums to determine whether or not run-time escaping of URLs has been set.
virtual bool elementAvailable(const XalanQName &theQName) const =0
Determine if an external element is available.
virtual XalanNode * getCurrentNode() const =0
Retrieve the node currently being executed.
This class defines an interface for classes that resolve namespace prefixes to their URIs...
virtual XalanDOMString & getCachedString()=0
Get a cached string for temporary use.
virtual const XalanDOMString & getUnparsedEntityURI(const XalanDOMString &theName, const XalanDocument &theDocument) const =0
The getUnparsedEntityURI function returns the URI of the unparsed entity with the specified name in t...
virtual MutableNodeRefList * createMutableNodeRefList(MemoryManager &theManager) const =0
Create a MutableNodeRefList with the appropriate context.
Class to hold XPath return types.
This is the parent class of events generated for tracing the progress of the XSL processor.
virtual void pushContextMarker()=0
Push a context marker onto the stack to let us know when to stop searching for a var.
virtual void pushCurrentStackFrameIndex(int currentStackFrameIndex=-1)=0
Set the top of the stack frame from where a search for a variable or param should take place...
virtual const XalanDOMString & findURIFromDoc(const XalanDocument *owner) const =0
Given a DOM Document, tell what URI was used to parse it.
virtual bool functionAvailable(const XalanQName &theQName) const =0
Determine if a function is available.
~ElementRecursionStackPusher()
size_type attributeSetNameIndex
#define XALAN_XSLT_EXPORT
NodeRefListBase::size_type size_type
XalanDOMString::size_type length(const XalanDOMString &theString)
Get the length of a XalanDOMString.
This class takes SAX events (in addition to some extra events that SAX doesn't handle yet) and produc...
This class represents the base stylesheet or an "import" stylesheet.
virtual size_type getContextNodeListPosition(const XalanNode &contextNode) const =0
This class can sort vectors of nodes according to a select pattern.
This class handles the creation of XObjects and manages their lifetime.
Class to represent a qualified name.
virtual void formatNumber(double number, const XalanDOMString &pattern, XalanDOMString &theResult, const XalanNode *context=0, const Locator *locator=0)=0
Formats a number according to the specified pattern.
virtual XalanDocument * parseXML(MemoryManager &theManager, const XalanDOMString &urlString, const XalanDOMString &base, ErrorHandler *theErrorHandler=0) const =0
Provides support for XML parsing service.
virtual void getNodeSetByKey(XalanNode *context, const XalanQName &qname, const XalanDOMString &ref, const Locator *locator, MutableNodeRefList &nodelist)=0
Given a valid element key, return the corresponding node list.
virtual const XalanDOMString * getNamespaceForPrefix(const XalanDOMString &prefix) const =0
Retrieve the URI corresponding to a namespace prefix.