You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by sh...@apache.org on 2011/11/01 05:50:44 UTC

svn commit: r1195820 - in /xalan/c/trunk/src/xalanc/XSLT: StylesheetExecutionContextDefault.cpp StylesheetRoot.cpp XSLTEngineImpl.cpp

Author: shathaway
Date: Tue Nov  1 04:50:44 2011
New Revision: 1195820

URL: http://svn.apache.org/viewvc?rev=1195820&view=rev
Log:
XALANC-715 FIX, Support empty strings, empty nodesets,

Modified:
    xalan/c/trunk/src/xalanc/XSLT/StylesheetExecutionContextDefault.cpp
    xalan/c/trunk/src/xalanc/XSLT/StylesheetRoot.cpp
    xalan/c/trunk/src/xalanc/XSLT/XSLTEngineImpl.cpp

Modified: xalan/c/trunk/src/xalanc/XSLT/StylesheetExecutionContextDefault.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XSLT/StylesheetExecutionContextDefault.cpp?rev=1195820&r1=1195819&r2=1195820&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XSLT/StylesheetExecutionContextDefault.cpp (original)
+++ xalan/c/trunk/src/xalanc/XSLT/StylesheetExecutionContextDefault.cpp Tue Nov  1 04:50:44 2011
@@ -2263,7 +2263,7 @@ bool
 StylesheetExecutionContextDefault::shouldStripSourceNode(const XalanText&   node)
 {
     assert(m_stylesheetRoot != 0);
-    assert(node.getData().length() != 0);
+//    assert(node.getData().length() != 0);
 
     return m_stylesheetRoot->shouldStripSourceNode(node);
 }

Modified: xalan/c/trunk/src/xalanc/XSLT/StylesheetRoot.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XSLT/StylesheetRoot.cpp?rev=1195820&r1=1195819&r2=1195820&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XSLT/StylesheetRoot.cpp (original)
+++ xalan/c/trunk/src/xalanc/XSLT/StylesheetRoot.cpp Tue Nov  1 04:50:44 2011
@@ -900,7 +900,11 @@ StylesheetRoot::internalShouldStripSourc
         hasPreserveOrStripSpaceElements() == true);
 
     const XalanNode* const  parent = textNode.getParentNode();
-    assert(parent != 0);
+
+//  assert(parent != 0);
+//  Constructed nodesets may not have parents - see xalan:nodeset()
+    if (parent == 0)
+        return false;
 
     if (parent->getNodeType() == XalanNode::ELEMENT_NODE)
     {

Modified: xalan/c/trunk/src/xalanc/XSLT/XSLTEngineImpl.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XSLT/XSLTEngineImpl.cpp?rev=1195820&r1=1195819&r2=1195820&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XSLT/XSLTEngineImpl.cpp (original)
+++ xalan/c/trunk/src/xalanc/XSLT/XSLTEngineImpl.cpp Tue Nov  1 04:50:44 2011
@@ -1626,7 +1626,7 @@ XSLTEngineImpl::characters(
     assert(getFormatterListenerImpl() != 0);
     assert(ch != 0);
     assert(m_hasCDATASectionElements == m_stylesheetRoot->hasCDATASectionElements());
-    assert(length != 0);
+//    assert(length != 0);
 
     doFlushPending();
 
@@ -1975,7 +1975,7 @@ XSLTEngineImpl::cloneToResultTree(
         m_executionContext->shouldStripSourceNode(node) == false)
     {
         const XalanDOMString&   data = node.getData();
-        assert(data.empty() == false);
+//        assert(data.empty() == false);
 
         characters(data.c_str(), 0, data.length());
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org