xml-xalan-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ig...@apache.org
Subject cvs commit: xml-xalan/java/src/org/apache/xalan/templates TemplateList.java
Date Thu, 16 Oct 2003 23:09:11 GMT
igorh       2003/10/16 16:09:11

  Modified:    java/src/org/apache/xalan/templates TemplateList.java
  Log:
  Patch for Bugzilla Bug 789. Submitted by  Richard Cao.
  
  Revision  Changes    Path
  1.36      +9 -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.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- TemplateList.java	30 Jan 2003 18:45:51 -0000	1.35
  +++ TemplateList.java	16 Oct 2003 23:09:11 -0000	1.36
  @@ -98,6 +98,14 @@
      */
     public void setTemplate(ElemTemplate template)
     {
  +    XPath matchXPath = template.getMatch();
  +    
  +    if (null == template.getName() && null == matchXPath)
  +    {  
  +      template.error(XSLTErrorResources.ER_NEED_NAME_OR_MATCH_ATTRIB,
  +          new Object[]{ "xsl:template" });
  +    }
  +    
       if (null != template.getName())
       {
         ElemTemplate existingTemplate = (ElemTemplate) m_namedTemplates.get(template.getName());
  @@ -121,7 +129,7 @@
         }
       }
   
  -    XPath matchXPath = template.getMatch();
  +    
   
       if (null != matchXPath)
       {
  
  
  

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


Mime
View raw message