You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by dm...@apache.org on 2006/03/29 17:33:26 UTC

svn commit: r389814 - in /xalan/c/trunk/src/xalanc/XSLT: ElemTemplateElement.cpp Stylesheet.cpp Stylesheet.hpp

Author: dmitryh
Date: Wed Mar 29 07:33:25 2006
New Revision: 389814

URL: http://svn.apache.org/viewcvs?rev=389814&view=rev
Log:
Fix for XALANC-609

Modified:
    xalan/c/trunk/src/xalanc/XSLT/ElemTemplateElement.cpp
    xalan/c/trunk/src/xalanc/XSLT/Stylesheet.cpp
    xalan/c/trunk/src/xalanc/XSLT/Stylesheet.hpp

Modified: xalan/c/trunk/src/xalanc/XSLT/ElemTemplateElement.cpp
URL: http://svn.apache.org/viewcvs/xalan/c/trunk/src/xalanc/XSLT/ElemTemplateElement.cpp?rev=389814&r1=389813&r2=389814&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XSLT/ElemTemplateElement.cpp (original)
+++ xalan/c/trunk/src/xalanc/XSLT/ElemTemplateElement.cpp Wed Mar 29 07:33:25 2006
@@ -1129,7 +1129,10 @@
         case XalanNode::CDATA_SECTION_NODE:
         case XalanNode::TEXT_NODE:
         case XalanNode::ATTRIBUTE_NODE:
-            theTemplate = getStylesheet().getStylesheetRoot().getDefaultTextRule();
+            if (DOMServices::isNamespaceDeclaration(static_cast<const XalanAttr&>(*child)) == false)
+            {
+                theTemplate = getStylesheet().getStylesheetRoot().getDefaultTextRule();
+            } 
             break;
 
         case XalanNode::DOCUMENT_NODE:

Modified: xalan/c/trunk/src/xalanc/XSLT/Stylesheet.cpp
URL: http://svn.apache.org/viewcvs/xalan/c/trunk/src/xalanc/XSLT/Stylesheet.cpp?rev=389814&r1=389813&r2=389814&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XSLT/Stylesheet.cpp (original)
+++ xalan/c/trunk/src/xalanc/XSLT/Stylesheet.cpp Wed Mar 29 07:33:25 2006
@@ -76,6 +76,8 @@
 
 const XalanDOMString            Stylesheet::s_emptyString(XalanMemMgrs::getDummyMemMgr());
 
+const Stylesheet::PatternTableVectorType    Stylesheet::s_emptyTemplateList(XalanMemMgrs::getDummyMemMgr());
+
 const XalanQNameByReference     Stylesheet::s_emptyQName;
 
 
@@ -1088,11 +1090,17 @@
 
     case XalanNode::ATTRIBUTE_NODE:
 #if defined(XALAN_OLD_STYLE_CASTS)
-        assert(DOMServices::isNamespaceDeclaration((const XalanAttr&)theNode) == false);
+        if (DOMServices::isNamespaceDeclaration((const XalanAttr&)theNode) == true)
 #else
-        assert(DOMServices::isNamespaceDeclaration(static_cast<const XalanAttr&>(theNode)) == false);
+        if ((DOMServices::isNamespaceDeclaration(static_cast<const XalanAttr&>(theNode)) == true))
 #endif
-        return locateAttributeMatchPatternDataList(DOMServices::getLocalNameOfNode(theNode));
+        {
+            return &s_emptyTemplateList;
+        } 
+        else
+        {
+            return locateAttributeMatchPatternDataList(DOMServices::getLocalNameOfNode(theNode));
+        }
         break;
 
     case XalanNode::CDATA_SECTION_NODE:

Modified: xalan/c/trunk/src/xalanc/XSLT/Stylesheet.hpp
URL: http://svn.apache.org/viewcvs/xalan/c/trunk/src/xalanc/XSLT/Stylesheet.hpp?rev=389814&r1=389813&r2=389814&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XSLT/Stylesheet.hpp (original)
+++ xalan/c/trunk/src/xalanc/XSLT/Stylesheet.hpp Wed Mar 29 07:33:25 2006
@@ -867,6 +867,8 @@
 	NamespacesHandler						m_namespacesHandler;
 
 	static const XalanDOMString				s_emptyString;
+
+    static const PatternTableVectorType     s_emptyTemplateList;
 };
 
 



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