18 #if !defined(STYLESHEETEXECUTIONCONTEXT_HEADER_GUARD_1357924680)
19 #define STYLESHEETEXECUTIONCONTEXT_HEADER_GUARD_1357924680
44 #if defined(XALAN_AUTO_PTR_REQUIRES_DEFINITION)
75 class ElemTemplateElement;
77 class FormatterListener;
78 class FormatterToText;
81 class NodeRefListBase;
88 class XalanOutputStream;
92 class XalanDocumentFragment;
95 class XalanNumberFormat;
99 class XResultTreeFrag;
118 MemoryManager& theMemoryManager,
132 getQuietConflictWarnings()
const = 0;
141 getCopyTextNodesOnly()
const = 0;
150 pushCopyTextNodesOnly(
bool copyTextNodesOnly) = 0;
157 popCopyTextNodesOnly() = 0;
171 m_executionContext(executionContext)
178 m_executionContext.popCopyTextNodesOnly();
194 #if !defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
200 pushProcessCurrentAttribute(
bool processAttribute) = 0;
206 popProcessCurrentAttribute() = 0;
214 pushSkipElementAttributes(
bool skipAttributes) = 0;
221 getSkipElementAttributes()
const = 0;
227 popSkipElementAttributes() = 0;
235 pushExecuteIf(
bool executeIf) = 0;
254 getRootDocument()
const = 0;
264 setRootDocument(
XalanNode* theDocument) = 0;
280 getCurrentMode()
const = 0;
288 pushCurrentMode(
const XalanQName* theMode) = 0;
303 getCurrentTemplate()
const = 0;
311 pushCurrentTemplate(
const ElemTemplate* theTemplate) = 0;
314 popCurrentTemplate() = 0;
316 #if defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
321 class PushAndPopCurrentTemplate
325 PushAndPopCurrentTemplate(
328 m_executionContext(executionContext)
333 ~PushAndPopCurrentTemplate()
335 m_executionContext.popCurrentTemplate();
341 StylesheetExecutionContext& m_executionContext;
349 isElementPending()
const = 0;
359 replacePendingAttribute(
360 const XalanDOMChar* theName,
361 const XalanDOMChar* theNewType,
362 const XalanDOMChar* theNewValue) = 0;
369 virtual FormatterListener*
370 getFormatterListener()
const = 0;
378 setFormatterListener(FormatterListener* flistener) = 0;
381 pushOutputContext(FormatterListener* flistener = 0) = 0;
384 popOutputContext() = 0;
399 m_executionContext(theExecutionContext)
401 m_executionContext.pushOutputContext(theNewListener);
406 m_executionContext.popOutputContext();
434 const XalanDOMChar* value) = 0;
442 copyNamespaceAttributes(
const XalanNode& src) = 0;
452 getResultPrefixForNamespace(
const XalanDOMString& theNamespace)
const = 0;
462 getResultNamespaceForPrefix(
const XalanDOMString& thePrefix)
const = 0;
490 getIndent()
const = 0;
498 setIndent(
int indentAmount) = 0;
519 returnXPath(
const XPath* xpath) = 0;
528 const XPath* xpath = 0) :
538 m_context.returnXPath(m_xpath);
551 const XPath*
const temp = m_xpath;
563 m_context.returnXPath(m_xpath);
573 const XPath* m_xpath;
602 #if defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
656 #if defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
707 pushContextMarker() = 0;
713 popContextMarker() = 0;
715 #if defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
720 class PushAndPopContextMarker
725 m_executionContext(executionContext)
730 PushAndPopContextMarker(
732 int& currentStackFrameIndex) :
733 m_executionContext(executionContext)
740 ~PushAndPopContextMarker()
742 m_executionContext.popContextMarker();
746 getExecutionContext()
const
748 return m_executionContext;
761 resolveTopLevelParams() = 0;
767 clearTopLevelParams() = 0;
769 #if defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
770 class ResolveAndClearTopLevelParams
775 m_executionContext(executionContext)
777 m_executionContext.resolveTopLevelParams();
780 ~ResolveAndClearTopLevelParams()
782 m_executionContext.clearTopLevelParams();
787 StylesheetExecutionContext& m_executionContext;
797 pushParams(
const ElemTemplateElement& xslCallTemplateElement) = 0;
804 virtual void beginParams() = 0;
809 virtual void endParams() = 0;
816 virtual void pushParam(
const XalanQName& qName,
const XObjectPtr& theValue) = 0;
829 virtual const XObjectPtr
830 getParamVariable(
const XalanQName& theName) = 0;
838 pushElementFrame(
const ElemTemplateElement* elem) = 0;
846 popElementFrame() = 0;
848 #if defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
853 class PushAndPopElementFrame
857 PushAndPopElementFrame(
858 StylesheetExecutionContext& executionContext,
859 const ElemTemplateElement* element) :
860 m_executionContext(executionContext)
862 executionContext.pushElementFrame(element);
865 ~PushAndPopElementFrame()
867 m_executionContext.popElementFrame();
872 StylesheetExecutionContext& m_executionContext;
882 getGlobalStackFrameIndex()
const = 0;
891 getCurrentStackFrameIndex()
const = 0;
900 pushCurrentStackFrameIndex(
int currentStackFrameIndex = -1) = 0;
906 popCurrentStackFrameIndex() = 0;
918 m_executionContext(executionContext),
919 m_savedIndex(executionContext.getCurrentStackFrameIndex())
926 m_executionContext.popCurrentStackFrameIndex();
933 const int m_savedIndex;
936 #if defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
940 class ParamsPushPop :
public PushAndPopContextMarker
947 PushAndPopContextMarker(executionContext)
949 doPush(xslCallTemplateElement);
953 StylesheetExecutionContext& executionContext,
954 const ElemTemplateElement& xslCallTemplateElement,
955 int& savedStackFrameIndex) :
956 PushAndPopContextMarker(executionContext, savedStackFrameIndex)
959 xslCallTemplateElement,
960 savedStackFrameIndex);
971 const ElemTemplateElement& xslCallTemplateElement,
972 int stackFrameIndex);
975 doPush(
const ElemTemplateElement& xslCallTemplateElement);
1011 startElement(
const XalanDOMChar* name) = 0;
1019 endElement(
const XalanDOMChar* name) = 0;
1030 const XalanDOMChar* ch,
1032 fl_size_type
length) = 0;
1045 const XalanDOMChar* ch,
1047 fl_size_type
length) = 0;
1055 comment(
const XalanDOMChar* data) = 0;
1064 processingInstruction(
1065 const XalanDOMChar* target,
1066 const XalanDOMChar* data) = 0;
1082 const XalanNode& node,
1083 const Locator* locator) = 0;
1096 const XalanNode& node,
1097 XalanNode::NodeType nodeType,
1099 bool shouldCloneAttributes,
1100 const Locator* locator) = 0;
1102 #if !defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
1108 beginCreateXResultTreeFrag(
1109 XalanNode* sourceNode) = 0;
1115 virtual const XObjectPtr
1116 endCreateXResultTreeFrag() = 0;
1125 XalanDOMString& theResult) = 0;
1132 endFormatToText() = 0;
1141 virtual const XObjectPtr
1142 createXResultTreeFrag(
1143 const ElemTemplateElement& templateChild,
1144 XalanNode* sourceNode) = 0;
1156 const XObject& xobj,
1157 const Locator* locator) = 0;
1167 outputResultTreeFragment(
1168 const XObject& theTree,
1169 const Locator* locator) = 0;
1176 virtual const XalanDOMString&
1177 getXSLNameSpaceURL()
const = 0;
1184 virtual const XalanDOMString&
1185 getXalanXSLNameSpaceURL()
const = 0;
1193 findOnElementRecursionStack(
const ElemTemplateElement* theElement)
const = 0;
1201 pushOnElementRecursionStack(
const ElemTemplateElement* theElement) = 0;
1208 virtual const ElemTemplateElement*
1209 popElementRecursionStack() = 0;
1227 m_executionContext(executionContext)
1229 m_executionContext.pushOnElementRecursionStack(element);
1234 m_executionContext.popElementRecursionStack();
1258 eDefaultXMLIndentAmount = 0,
1259 eDefaultHTMLIndentAmount = 0
1280 getEscapeURLs()
const = 0;
1290 setEscapeURLs(eEscapeURLs value) = 0;
1310 virtual eOmitMETATag
1311 getOmitMETATag()
const = 0;
1321 setOmitMETATag(eOmitMETATag value) = 0;
1345 createFormatterToXML(
1348 bool doIndent =
false,
1349 int indent = eDefaultXMLIndentAmount,
1354 bool xmlDecl =
true,
1375 createFormatterToHTML(
1381 bool doIndent =
true,
1382 int indent = eDefaultHTMLIndentAmount,
1383 bool escapeURLs =
true,
1384 bool omitMetaTag =
false) = 0;
1393 createFormatterToText(
1397 #if defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
1398 class BorrowReturnFormatterToText
1402 BorrowReturnFormatterToText(
1405 bool normalizeLinefeed =
true,
1406 bool handleIgnorableWhitespace =
true);
1408 ~BorrowReturnFormatterToText()
1410 assert(m_formatter != 0);
1412 m_executionContext.returnFormatterToText(m_formatter);
1418 assert(m_formatter != 0);
1420 return *m_formatter;
1426 assert(m_formatter != 0);
1439 StylesheetExecutionContext& m_executionContext;
1441 FormatterToText* m_formatter;
1445 friend class BorrowReturnFormatterToText;
1448 #if !defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
1453 getNodeSorter() = 0;
1462 borrowNodeSorter() = 0;
1471 returnNodeSorter(NodeSorter* theSorter) = 0;
1473 class BorrowReturnNodeSorter
1477 BorrowReturnNodeSorter(StylesheetExecutionContext& executionContext) :
1478 m_executionContext(executionContext),
1479 m_sorter(executionContext.borrowNodeSorter())
1481 assert(m_sorter != 0);
1484 ~BorrowReturnNodeSorter()
1486 assert(m_sorter != 0);
1488 m_executionContext.returnNodeSorter(m_sorter);
1494 assert(m_sorter != 0);
1502 assert(m_sorter != 0);
1515 StylesheetExecutionContext& m_executionContext;
1517 NodeSorter* m_sorter;
1530 createXalanNumberFormat() = 0;
1532 #if !defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
1540 attributeSetNameIndex(0),
1541 matchingAttributeSetIndex(0) {}
1550 createUseAttributeSetIndexesOnStack() = 0;
1553 getUseAttributeSetIndexes() = 0;
1556 popUseAttributeSetIndexesFromStack() = 0;
1578 getInvoker()
const = 0;
1587 getTraceListeners()
const = 0;
1619 getTraceSelects()
const = 0;
1632 const XPath* xpath) = 0;
1677 const XalanDOMChar* theLHS,
1678 const XalanDOMChar* theRHS,
1693 const XalanDOMChar* theLHS,
1694 const XalanDOMChar* theRHS,
1695 const XalanDOMChar* theLocale,
1727 createPrintWriter(
StreamType& theStream) = 0;
1736 createPrintWriter(FILE* theStream) = 0;
1745 getCountersTable() = 0;
1770 charactersRaw(
const XalanNode& node) = 0;
1778 charactersRaw(
const XObjectPtr& xobject) = 0;
1787 getCurrentNode()
const = 0;
1790 pushCurrentNode(
XalanNode* theCurrentNode) = 0;
1793 popCurrentNode() = 0;
1804 popContextNodeList() = 0;
1807 getContextNodeList()
const = 0;
1810 getContextNodeListLength()
const = 0;
1813 getContextNodeListPosition(
const XalanNode& contextNode)
const = 0;
1823 elementAvailable(
const XalanQName& theQName)
const = 0;
1837 const Locator* locator)
const = 0;
1847 functionAvailable(
const XalanQName& theQName)
const = 0;
1860 const Locator* locator)
const = 0;
1868 const Locator* locator) = 0;
1872 MemoryManager& theManager,
1875 ErrorHandler* theErrorHandler = 0)
const = 0;
1878 borrowMutableNodeRefList() = 0;
1884 createMutableNodeRefList(MemoryManager& theManager)
const = 0;
1886 #if !defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
1889 createAndPushMutableNodeRefList() = 0;
1892 releaseAndPopMutableNodeRefList() = 0;
1895 pushXObjectPtr(
const XObjectPtr& xobjectPtr) = 0;
1898 popXObjectPtr() = 0;
1901 createAndPushNodesToTransformList(
const NodeRefListBase* nodeList) = 0;
1904 getNextNodeToTransform() = 0;
1907 popNodesToTransformList() = 0;
1914 getAndPushCachedString() = 0;
1921 getLastCachedString() = 0;
1931 getAndPopCachedString() = 0;
1935 getCachedString() = 0;
1946 const Locator* locator,
1954 const Locator* locator,
1960 const Locator* locator = 0) = 0;
1963 getPrefixResolver()
const = 0;
1975 getUnparsedEntityURI(
1980 shouldStripSourceNode(
const XalanText& node) = 0;
1996 const Locator* locator = 0) = 0;
2005 const Locator* locator = 0) = 0;
2014 const Locator* locator,
2024 #if defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
2032 borrowFormatterToText() = 0;
2051 #endif // STYLESHEETEXECUTIONCONTEXT_HEADER_GUARD_1357924680