morten      01/08/08 02:05:19

  Modified:    java/src/org/apache/xalan/xsltc/compiler XslElement.java
  Log:
  Added a test to the <xsl:element> element to verify that the element name
  given in the 'name' attribute contains something other than an empty string.
  PR:           bugzilla 2794
  Obtained from:        n/a
  Submitted by: [EMAIL PROTECTED]
  Reviewed by:  [EMAIL PROTECTED]
  
  Revision  Changes    Path
  1.9       +9 -1      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/XslElement.java
  
  Index: XslElement.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/XslElement.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- XslElement.java   2001/06/12 10:35:19     1.8
  +++ XslElement.java   2001/08/08 09:05:19     1.9
  @@ -1,5 +1,5 @@
   /*
  - * @(#)$Id: XslElement.java,v 1.8 2001/06/12 10:35:19 morten Exp $
  + * @(#)$Id: XslElement.java,v 1.9 2001/08/08 09:05:19 morten Exp $
    *
    * The Apache Software License, Version 1.1
    *
  @@ -107,6 +107,14 @@
   
        // If that is undefied we use the prefix in the supplied QName
        String name = getAttribute("name");
  +     if ((name == null) || (name.equals(Constants.EMPTYSTRING))) {
  +         final ErrorMsg msg = 
  +             new ErrorMsg("You can't call an element \"\"");
  +         parser.reportError(Constants.WARNING, msg);
  +         _ignore = true;
  +         return;
  +     }
  +
        QName qname = parser.getQNameSafe(name);
        final String prefix = qname.getPrefix();
        if ((namespace == null || namespace == Constants.EMPTYSTRING) && 
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to