You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by mh...@apache.org on 2005/01/08 00:49:30 UTC
cvs commit: xml-xalan/c/src/xalanc/XSLT ElemForEach.cpp StylesheetExecutionContextDefault.cpp
mhoyt 2005/01/07 15:49:30
Modified: c/src/xalanc/XSLT ElemForEach.cpp
StylesheetExecutionContextDefault.cpp
Log:
Fixed two issues: No exception should be generated if <xsl:for-each> contains variables and no nodes are selected. In addition, if an exception occurs elsewhere, assertion/abort should not occur when resetting the execution context
PR: XALANC-447
Revision Changes Path
1.16 +6 -1 xml-xalan/c/src/xalanc/XSLT/ElemForEach.cpp
Index: ElemForEach.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/xalanc/XSLT/ElemForEach.cpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- ElemForEach.cpp 10 Dec 2004 04:01:51 -0000 1.15
+++ ElemForEach.cpp 7 Jan 2005 23:49:29 -0000 1.16
@@ -252,7 +252,12 @@
{
if (hasChildren() == true)
{
- endExecuteChildren(executionContext);
+ // Children only executed if there were selected nodes
+ if(executionContext.getContextNodeList().getLength() > 0)
+ {
+ endExecuteChildren(executionContext);
+ }
+
executionContext.popNodesToTransformList();
executionContext.popContextNodeList();
releaseSelectedAndSortedNodeList(executionContext);
1.37 +4 -1 xml-xalan/c/src/xalanc/XSLT/StylesheetExecutionContextDefault.cpp
Index: StylesheetExecutionContextDefault.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/xalanc/XSLT/StylesheetExecutionContextDefault.cpp,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- StylesheetExecutionContextDefault.cpp 14 Nov 2004 21:13:08 -0000 1.36
+++ StylesheetExecutionContextDefault.cpp 7 Jan 2005 23:49:29 -0000 1.37
@@ -1912,6 +1912,10 @@
m_variablesStack.reset();
+#if !defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
+ m_xobjectPtrStack.clear();
+#endif
+
if (m_xsltProcessor != 0)
{
m_xsltProcessor->reset();
@@ -1953,7 +1957,6 @@
m_currentIndexStack.clear();
#if !defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
- m_xobjectPtrStack.clear();
m_nodesToTransformStack.clear();
m_processCurrentAttributeStack.clear();
m_skipElementAttributesStack.clear();
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org