You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by mm...@locus.apache.org on 2000/08/30 16:20:56 UTC
cvs commit: xml-xalan/java/src/org/apache/xalan/templates TemplateList.java
mmidy 00/08/30 07:20:54
Modified: java/src/org/apache/xalan/templates TemplateList.java
Log:
Error if have two templates with same name and import precedence
Revision Changes Path
1.5 +4 -1 xml-xalan/java/src/org/apache/xalan/templates/TemplateList.java
Index: TemplateList.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/templates/TemplateList.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- TemplateList.java 2000/08/10 23:30:48 1.4
+++ TemplateList.java 2000/08/30 14:20:53 1.5
@@ -109,7 +109,10 @@
}
if(null != template.getName())
{
- m_namedTemplates.put(template.getName(), template);
+ if (m_namedTemplates.get(template.getName()) == null)
+ m_namedTemplates.put(template.getName(), template);
+ else
+ template.error(XSLTErrorResources.ER_DUPLICATE_NAMED_TEMPLATE, new Object[]{template.getName()});
}
if(null != template.getMatch())