16 #if !defined(STYLESHEETEXECUTIONCONTEXT_HEADER_GUARD_1357924680)
17 #define STYLESHEETEXECUTIONCONTEXT_HEADER_GUARD_1357924680
47 #if defined(XALAN_AUTO_PTR_REQUIRES_DEFINITION)
67 XALAN_CPP_NAMESPACE_BEGIN
108 #if defined(XALAN_STRICT_ANSI_HEADERS)
114 #if defined(XALAN_NO_STD_NAMESPACE)
139 const XalanNode* sourceNode = 0)
const = 0;
152 const XalanNode* sourceNode = 0)
const = 0;
165 const XalanNode* sourceNode = 0)
const = 0;
174 getQuietConflictWarnings()
const = 0;
183 getCopyTextNodesOnly()
const = 0;
192 pushCopyTextNodesOnly(
bool copyTextNodesOnly) = 0;
199 popCopyTextNodesOnly() = 0;
213 m_executionContext(executionContext)
220 m_executionContext.popCopyTextNodesOnly();
236 #if !defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
242 pushProcessCurrentAttribute(
bool processAttribute) = 0;
248 popProcessCurrentAttribute() = 0;
256 pushSkipElementAttributes(
bool skipAttributes) = 0;
263 getSkipElementAttributes()
const = 0;
269 popSkipElementAttributes() = 0;
277 pushExecuteIf(
bool executeIf) = 0;
296 getRootDocument()
const = 0;
306 setRootDocument(
XalanNode* theDocument) = 0;
322 getCurrentMode()
const = 0;
330 pushCurrentMode(
const XalanQName* theMode) = 0;
345 getCurrentTemplate()
const = 0;
353 pushCurrentTemplate(
const ElemTemplate* theTemplate) = 0;
356 popCurrentTemplate() = 0;
358 #if defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
363 class PushAndPopCurrentTemplate
367 PushAndPopCurrentTemplate(
370 m_executionContext(executionContext)
375 ~PushAndPopCurrentTemplate()
377 m_executionContext.popCurrentTemplate();
391 isElementPending()
const = 0;
401 replacePendingAttribute(
402 const XalanDOMChar* theName,
403 const XalanDOMChar* theNewType,
404 const XalanDOMChar* theNewValue) = 0;
412 getFormatterListener()
const = 0;
426 popOutputContext() = 0;
441 m_executionContext(theExecutionContext)
443 m_executionContext.pushOutputContext(theNewListener);
448 m_executionContext.popOutputContext();
476 const XalanDOMChar* value) = 0;
484 copyNamespaceAttributes(
const XalanNode& src) = 0;
494 getResultPrefixForNamespace(
const XalanDOMString& theNamespace)
const = 0;
504 getResultNamespaceForPrefix(
const XalanDOMString& thePrefix)
const = 0;
532 getIndent()
const = 0;
540 setIndent(
int indentAmount) = 0;
561 returnXPath(
const XPath* xpath) = 0;
570 const XPath* xpath = 0) :
580 m_context.returnXPath(m_xpath);
593 const XPath*
const temp = m_xpath;
605 m_context.returnXPath(m_xpath);
615 const XPath* m_xpath;
644 #if defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
698 #if defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
749 pushContextMarker() = 0;
755 popContextMarker() = 0;
757 #if defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
762 class PushAndPopContextMarker
767 m_executionContext(executionContext)
772 PushAndPopContextMarker(
774 int& currentStackFrameIndex) :
775 m_executionContext(executionContext)
782 ~PushAndPopContextMarker()
784 m_executionContext.popContextMarker();
788 getExecutionContext()
const
790 return m_executionContext;
803 resolveTopLevelParams() = 0;
809 clearTopLevelParams() = 0;
811 #if defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
812 class ResolveAndClearTopLevelParams
817 m_executionContext(executionContext)
819 m_executionContext.resolveTopLevelParams();
822 ~ResolveAndClearTopLevelParams()
824 m_executionContext.clearTopLevelParams();
846 virtual void beginParams() = 0;
851 virtual void endParams() = 0;
872 getParamVariable(
const XalanQName& theName) = 0;
888 popElementFrame() = 0;
890 #if defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
895 class PushAndPopElementFrame
899 PushAndPopElementFrame(
902 m_executionContext(executionContext)
907 ~PushAndPopElementFrame()
909 m_executionContext.popElementFrame();
924 getGlobalStackFrameIndex()
const = 0;
933 getCurrentStackFrameIndex()
const = 0;
942 pushCurrentStackFrameIndex(
int currentStackFrameIndex = -1) = 0;
948 popCurrentStackFrameIndex() = 0;
960 m_executionContext(executionContext),
961 m_savedIndex(executionContext.getCurrentStackFrameIndex())
968 m_executionContext.popCurrentStackFrameIndex();
975 const int m_savedIndex;
978 #if defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
982 class ParamsPushPop :
public PushAndPopContextMarker
989 PushAndPopContextMarker(executionContext)
991 doPush(xslCallTemplateElement);
997 int& savedStackFrameIndex) :
998 PushAndPopContextMarker(executionContext, savedStackFrameIndex)
1001 xslCallTemplateElement,
1002 savedStackFrameIndex);
1014 int stackFrameIndex);
1031 startDocument() = 0;
1053 startElement(
const XalanDOMChar* name) = 0;
1061 endElement(
const XalanDOMChar* name) = 0;
1072 const XalanDOMChar* ch,
1087 const XalanDOMChar* ch,
1097 comment(
const XalanDOMChar* data) = 0;
1106 processingInstruction(
1107 const XalanDOMChar* target,
1108 const XalanDOMChar* data) = 0;
1141 bool shouldCloneAttributes,
1144 #if !defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
1150 beginCreateXResultTreeFrag(
1158 endCreateXResultTreeFrag() = 0;
1174 endFormatToText() = 0;
1184 createXResultTreeFrag(
1209 outputResultTreeFragment(
1219 getXSLNameSpaceURL()
const = 0;
1227 getXalanXSLNameSpaceURL()
const = 0;
1251 popElementRecursionStack() = 0;
1269 m_executionContext(executionContext)
1271 m_executionContext.pushOnElementRecursionStack(element);
1276 m_executionContext.popElementRecursionStack();
1300 eDefaultXMLIndentAmount = 0,
1301 eDefaultHTMLIndentAmount = 0
1322 getEscapeURLs()
const = 0;
1332 setEscapeURLs(eEscapeURLs value) = 0;
1352 virtual eOmitMETATag
1353 getOmitMETATag()
const = 0;
1363 setOmitMETATag(eOmitMETATag value) = 0;
1387 createFormatterToXML(
1390 bool doIndent =
false,
1391 int indent = eDefaultXMLIndentAmount,
1396 bool xmlDecl =
true,
1417 createFormatterToHTML(
1423 bool doIndent =
true,
1424 int indent = eDefaultHTMLIndentAmount,
1425 bool escapeURLs =
true,
1426 bool omitMetaTag =
false) = 0;
1435 createFormatterToText(
1439 #if defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
1440 class BorrowReturnFormatterToText
1444 BorrowReturnFormatterToText(
1447 bool normalizeLinefeed =
true,
1448 bool handleIgnorableWhitespace =
true);
1450 ~BorrowReturnFormatterToText()
1452 assert(m_formatter != 0);
1454 m_executionContext.returnFormatterToText(m_formatter);
1460 assert(m_formatter != 0);
1462 return *m_formatter;
1468 assert(m_formatter != 0);
1487 friend class BorrowReturnFormatterToText;
1490 #if !defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
1495 getNodeSorter() = 0;
1504 borrowNodeSorter() = 0;
1515 class BorrowReturnNodeSorter
1520 m_executionContext(executionContext),
1521 m_sorter(executionContext.borrowNodeSorter())
1523 assert(m_sorter != 0);
1526 ~BorrowReturnNodeSorter()
1528 assert(m_sorter != 0);
1530 m_executionContext.returnNodeSorter(m_sorter);
1536 assert(m_sorter != 0);
1544 assert(m_sorter != 0);
1572 createXalanNumberFormat() = 0;
1574 #if !defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
1582 attributeSetNameIndex(0),
1583 matchingAttributeSetIndex(0) {}
1592 createUseAttributeSetIndexesOnStack() = 0;
1595 getUseAttributeSetIndexes() = 0;
1598 popUseAttributeSetIndexesFromStack() = 0;
1620 getInvoker()
const = 0;
1629 getTraceListeners()
const = 0;
1661 getTraceSelects()
const = 0;
1674 const XPath* xpath) = 0;
1719 const XalanDOMChar* theLHS,
1720 const XalanDOMChar* theRHS,
1735 const XalanDOMChar* theLHS,
1736 const XalanDOMChar* theRHS,
1737 const XalanDOMChar* theLocale,
1769 createPrintWriter(
StreamType& theStream) = 0;
1778 createPrintWriter(FILE* theStream) = 0;
1787 getCountersTable() = 0;
1812 charactersRaw(
const XalanNode& node) = 0;
1820 charactersRaw(
const XObjectPtr& xobject) = 0;
1927 #if !defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
1930 createAndPushMutableNodeRefList() = 0;
1933 releaseAndPopMutableNodeRefList() = 0;
1936 pushXObjectPtr(
const XObjectPtr& xobjectPtr) = 0;
1939 popXObjectPtr() = 0;
1942 createAndPushNodesToTransformList(
const NodeRefListBase* nodeList) = 0;
1945 getNextNodeToTransform() = 0;
1948 popNodesToTransformList() = 0;
1955 getAndPushCachedString() = 0;
1962 getLastCachedString() = 0;
1972 getAndPopCachedString() = 0;
2067 #if defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
2075 borrowFormatterToText() = 0;
2090 XALAN_CPP_NAMESPACE_END
2094 #endif // STYLESHEETEXECUTIONCONTEXT_HEADER_GUARD_1357924680
Definition: StylesheetExecutionContext.hpp:1310
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.
Definition: ElemVariable.hpp:52
virtual bool shouldStripSourceNode(const XalanText &node)=0
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.
Definition: XalanNode.hpp:44
Definition: XalanText.hpp:38
virtual void message(const XalanDOMString &msg, const XalanNode *sourceNode=0, const LocatorType *locator=0) const =0
Output a message.
SetAndRestoreCopyTextNodesOnly(StylesheetExecutionContext &executionContext, bool fValue)
Definition: StylesheetExecutionContext.hpp:210
Definition: ElemTemplate.hpp:41
virtual bool returnMutableNodeRefList(MutableNodeRefList *theList)=0
Return a previously borrowed MutableNodeRefList instance.
Local implementation of MutableNodeRefList.
Definition: MutableNodeRefList.hpp:44
XPathGuard(StylesheetExecutionContext &context, const XPath *xpath=0)
Definition: StylesheetExecutionContext.hpp:568
XALAN_CPP_NAMESPACE_BEGIN typedef XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager MemoryManagerType
Definition: XalanMemoryManagement.hpp:39
ElementRecursionStackPusher(StylesheetExecutionContext &executionContext, const ElemTemplateElement *element)
Construct an instance of the recursion stack pusher.
Definition: StylesheetExecutionContext.hpp:1266
UseAttributeSetIndexes()
Definition: StylesheetExecutionContext.hpp:1581
Definition: Writer.hpp:42
XalanVector< TopLevelArg > ParamVectorType
Definition: StylesheetExecutionContext.hpp:618
virtual void pushCurrentTemplate(const ElemTemplate *theTemplate)=0
Set the current template.
This is a table of counters, keyed by ElemNumber objects...
Definition: CountersTable.hpp:160
~SetAndRestoreCopyTextNodesOnly()
Definition: StylesheetExecutionContext.hpp:218
Definition: ElemTemplateElement.hpp:74
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)
Definition: StylesheetExecutionContext.hpp:601
Definition: StylesheetExecutionContext.hpp:1579
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.
virtual void reset()=0
Reset the instance.
Definition: XalanDocumentFragment.hpp:38
This acts as the stylesheet root of the stylesheet tree, and holds values that are shared by all styl...
Definition: StylesheetRoot.hpp:61
NodeType
Definition: XalanNode.hpp:53
Definition: StylesheetExecutionContext.hpp:104
Definition: XalanElement.hpp:42
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...
Definition: StylesheetExecutionContext.hpp:564
Class to hold XObjectPtr return types.
Definition: XObject.hpp:584
XalanMemMgrAutoPtr< XalanNumberFormat, true > XalanNumberFormatAutoPtr
Definition: StylesheetExecutionContext.hpp:1563
eOmitMETATag
Enums to determine whether or not run-time omission of the META tag has been set. ...
Definition: StylesheetExecutionContext.hpp:1338
size_type matchingAttributeSetIndex
Definition: StylesheetExecutionContext.hpp:1586
virtual MutableNodeRefList * createMutableNodeRefList(MemoryManagerType &theManager) const =0
Create a MutableNodeRefList with the appropriate context.
This is the class for events generated by the XSL processor after it generates a new node in the resu...
Definition: GenerateEvent.hpp:50
Definition: XPathExecutionContext.hpp:72
~OutputContextPushPop()
Definition: StylesheetExecutionContext.hpp:446
Class for keeping track of elements pushed on the element recursion stack.
Definition: StylesheetExecutionContext.hpp:1256
SetAndRestoreCurrentStackFrameIndex(StylesheetExecutionContext &executionContext, int newIndex)
Definition: StylesheetExecutionContext.hpp:957
Definition: PrintWriter.hpp:35
Definition: StylesheetExecutionContext.hpp:1340
Local implementation of NodeRefList.
Definition: NodeRefListBase.hpp:42
virtual void setSourceDocument(const XalanDOMString &theURI, XalanDocument *theDocument)=0
Associate a document with a given URI.
Definition: StylesheetExecutionContext.hpp:1309
size_t tl_size_type
Definition: StylesheetExecutionContext.hpp:111
~SetAndRestoreCurrentStackFrameIndex()
Definition: StylesheetExecutionContext.hpp:966
virtual void popCurrentNode()=0
Reset the node currently being executed.
Definition: StylesheetExecutionContext.hpp:1341
Definition: StylesheetExecutionContext.hpp:953
virtual const XObjectPtr extFunction(const XalanDOMString &theNamespace, const XalanDOMString &functionName, XalanNode *context, const XObjectArgVectorType &argVec, const LocatorType *locator)=0
Handle an extension function.
static MemoryManager & getDummyMemMgr()
eDummy
Definition: StylesheetExecutionContext.hpp:1298
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.
Definition: StylesheetExecutionContext.hpp:438
Definition: StylesheetExecutionContext.hpp:206
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.
Definition: XalanCollationServices.hpp:38
eEscapeURLs
Enums to determine whether or not run-time escaping of URLs has been set.
Definition: StylesheetExecutionContext.hpp:1307
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...
Definition: PrefixResolver.hpp:37
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 void warn(const XalanDOMString &msg, const XalanNode *sourceNode=0, const LocatorType *locator=0) const =0
Report a warning.
Class to hold XPath return types.
Definition: XObject.hpp:61
This is the parent class of events generated for tracing the progress of the XSL processor.
Definition: TracerEvent.hpp:47
virtual void pushContextMarker()=0
Push a context marker onto the stack to let us know when to stop searching for a var.
Definition: XalanDocument.hpp:51
const XPath * release()
Definition: StylesheetExecutionContext.hpp:591
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...
eCaseOrder
Definition: XalanCollationServices.hpp:38
Definition: XalanMemMgrAutoPtr.hpp:46
std::ostream StreamType
Definition: StylesheetExecutionContext.hpp:117
~XPathGuard()
Definition: StylesheetExecutionContext.hpp:576
virtual const XalanDOMString & findURIFromDoc(const XalanDocument *owner) const =0
Given a DOM Document, tell what URI was used to parse it.
Definition: XalanOutputStream.hpp:47
virtual bool functionAvailable(const XalanQName &theQName) const =0
Determine if a function is available.
~ElementRecursionStackPusher()
Definition: StylesheetExecutionContext.hpp:1274
size_type attributeSetNameIndex
Definition: StylesheetExecutionContext.hpp:1585
#define XALAN_XSLT_EXPORT
Definition: XSLTDefinitions.hpp:25
virtual void getNodeSetByKey(XalanDocument *doc, const XalanQName &qname, const XalanDOMString &ref, MutableNodeRefList &nodelist)=0
Given a valid element key, return the corresponding node list.
NodeRefListBase::size_type size_type
Definition: XPathExecutionContext.hpp:78
Definition: XalanDOMString.hpp:42
Definition: SelectionEvent.hpp:45
XalanDOMString::size_type length(const XalanDOMString &theString)
Get the length of a XalanDOMString.
Definition: DOMStringHelper.hpp:277
This class takes SAX events (in addition to some extra events that SAX doesn't handle yet) and produc...
Definition: FormatterToText.hpp:47
This class represents the base stylesheet or an "import" stylesheet.
Definition: Stylesheet.hpp:84
virtual size_type getContextNodeListPosition(const XalanNode &contextNode) const =0
Definition: XResultTreeFrag.hpp:55
This class can sort vectors of nodes according to a select pattern.
Definition: NodeSorter.hpp:66
unsigned int size_type
Definition: XalanDOMString.hpp:53
virtual const XObjectPtr getVariable(const XalanQName &name, const LocatorType *locator=0)=0
Given a name, locate a variable in the current context, and return a pointer to the object...
virtual void formatNumber(double number, const XalanDOMString &pattern, XalanDOMString &theResult, const XalanNode *context=0, const LocatorType *locator=0)=0
Formats a number according to the specified pattern.
virtual XalanDocument * parseXML(MemoryManagerType &theManager, const XalanDOMString &urlString, const XalanDOMString &base) const =0
Provides support for XML parsing service.
virtual void error(const XalanDOMString &msg, const XalanNode *sourceNode=0, const LocatorType *locator=0) const =0
Report an error and throw an exception.
Definition: StylesheetExecutionContext.hpp:428
This class handles the creation of XObjects and manages their lifetime.
Definition: XObjectFactory.hpp:51
Class to represent a qualified name: "The name of an internal XSLT object, specifically a named templ...
Definition: XalanQName.hpp:68
Definition: XalanVector.hpp:61
virtual const XalanDOMString * getNamespaceForPrefix(const XalanDOMString &prefix) const =0
Retrieve the URI corresponding to a namespace prefix.