You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by db...@apache.org on 2001/02/04 06:42:11 UTC
cvs commit: xml-xalan/c/src/XSLT ElemCallTemplate.cpp
dbertoni 01/02/03 21:42:11
Modified: c/src/XSLT ElemCallTemplate.cpp
Log:
Changed check for empty name to assert.
Revision Changes Path
1.11 +9 -14 xml-xalan/c/src/XSLT/ElemCallTemplate.cpp
Index: ElemCallTemplate.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemCallTemplate.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- ElemCallTemplate.cpp 2000/11/27 21:44:17 1.10
+++ ElemCallTemplate.cpp 2001/02/04 05:42:11 1.11
@@ -130,15 +130,15 @@
{
ElemTemplateElement::execute(executionContext, sourceTree, sourceNode, mode);
- if(!isEmpty(m_templateName.getLocalPart()))
- {
- const ElemTemplate* const theTemplate =
+ assert(isEmpty(m_templateName.getLocalPart()) == false);
+
+ const ElemTemplate* const theTemplate =
getStylesheet().getStylesheetRoot().findNamedTemplate(m_templateName,
executionContext);
- if(0 != theTemplate)
- {
- StylesheetExecutionContext::ParamsPushPop thePushPop(
+ if(0 != theTemplate)
+ {
+ StylesheetExecutionContext::ParamsPushPop thePushPop(
executionContext,
theTemplate,
*this,
@@ -147,17 +147,12 @@
mode,
theTemplate);
- theTemplate->execute(executionContext, sourceTree, sourceNode, mode);
- }
- else
- {
- executionContext.error("Could not find template named: '" +
- m_templateName.getLocalPart() + "'");
- }
+ theTemplate->execute(executionContext, sourceTree, sourceNode, mode);
}
else
{
- executionContext.error("Could not resolve name in xsl:call-template.");
+ executionContext.error("Could not find template named: '" +
+ m_templateName.getLocalPart() + "'");
}
}