dbertoni 2004/10/16 21:50:09
Modified: c/src/xalanc/XSLT StylesheetExecutionContext.hpp
VariablesStack.cpp
Log:
Make sure we don't use helper classes for recursive execution when we are
executing iteratively.
Revision Changes Path
1.23 +20 -10
xml-xalan/c/src/xalanc/XSLT/StylesheetExecutionContext.hpp
Index: StylesheetExecutionContext.hpp
===================================================================
RCS file:
/home/cvs/xml-xalan/c/src/xalanc/XSLT/StylesheetExecutionContext.hpp,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- StylesheetExecutionContext.hpp 13 Aug 2004 15:49:47 -0000 1.22
+++ StylesheetExecutionContext.hpp 17 Oct 2004 04:50:09 -0000 1.23
@@ -354,6 +354,7 @@
virtual void
popCurrentTemplate() = 0;
+#if defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
/*
* A class to manage pushing and popping the current
* template instance.
@@ -380,6 +381,7 @@
// Data members...
StylesheetExecutionContext& m_executionContext;
};
+#endif
/**
* Whether diagnostic output is to be generated
@@ -794,6 +796,7 @@
virtual void
popContextMarker() = 0;
+#if defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
/*
* A class to manage pushing and popping an element's stack
* frame context.
@@ -833,6 +836,7 @@
StylesheetExecutionContext& m_executionContext;
};
+#endif
/**
* Resolve the params that were pushed by the caller.
@@ -846,6 +850,7 @@
virtual void
clearTopLevelParams() = 0;
+#if defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
class ResolveAndClearTopLevelParams
{
public:
@@ -866,7 +871,17 @@
StylesheetExecutionContext& m_executionContext;
};
-#if !defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
+ /**
+ * Given a template, search for the arguments and push them on the
stack.
+ * Also, push default arguments on the stack.
+ *
+ * @param xslCallTemplateElement "call-template" element
+ */
+ virtual void
+ pushParams(const ElemTemplateElement& xslCallTemplateElement) = 0;
+
+#else
+
/**
* Initiate context to accept a new set of parameters
*/
@@ -883,15 +898,6 @@
* @param theValue the value of the parameter
*/
virtual void pushParam(const XalanQName& qName,const XObjectPtr&
theValue) = 0;
-#else
- /**
- * Given a template, search for the arguments and push them on the
stack.
- * Also, push default arguments on the stack.
- *
- * @param xslCallTemplateElement "call-template" element
- */
- virtual void
- pushParams(const ElemTemplateElement& xslCallTemplateElement) = 0;
#endif
/**
@@ -923,6 +929,7 @@
virtual void
popElementFrame() = 0;
+#if defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
/*
* A class to manage pushing and popping an element's stack
* frame context.
@@ -948,6 +955,7 @@
StylesheetExecutionContext& m_executionContext;
};
+#endif
/**
* Get the top of the global stack frame.
@@ -1009,6 +1017,7 @@
const int
m_savedIndex;
};
+#if defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
/*
* A class to manage stack state during execution.
*/
@@ -1049,6 +1058,7 @@
void
doPush(const ElemTemplateElement& xslCallTemplateElement);
};
+#endif
/**
* Receive notification of the beginning of a document.
1.12 +8 -0 xml-xalan/c/src/xalanc/XSLT/VariablesStack.cpp
Index: VariablesStack.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/xalanc/XSLT/VariablesStack.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- VariablesStack.cpp 24 Aug 2004 14:03:16 -0000 1.11
+++ VariablesStack.cpp 17 Oct 2004 04:50:09 -0000 1.12
@@ -394,13 +394,21 @@
m_guardStack.push_back(var);
+#if !defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
+ executionContext.pushContextMarker();
+#else
// We need to set up a stack frame for the
variable's execution...
typedef
StylesheetExecutionContext::PushAndPopContextMarker PushAndPopContextMarker;
const PushAndPopContextMarker
theContextMarkerPushPop(executionContext);
+#endif
theNewValue = var->getValue(executionContext,
doc);
assert(theNewValue.null() == false);
+
+#if !defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
+ executionContext.popContextMarker();
+#endif
assert(m_guardStack.empty() == false);
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]