You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by sa...@apache.org on 2003/10/03 18:26:09 UTC

cvs commit: xml-xalan/java/src/org/apache/xalan/xsltc/compiler XSLTC.java

santiagopg    2003/10/03 09:26:09

  Modified:    java/src/org/apache/xalan/xsltc/compiler XSLTC.java
  Log:
  Ensure we set a non-empty name for the translet even when one cannot be obtained from the systemId.
  
  Revision  Changes    Path
  1.55      +9 -4      xml-xalan/java/src/org/apache/xalan/xsltc/compiler/XSLTC.java
  
  Index: XSLTC.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/XSLTC.java,v
  retrieving revision 1.54
  retrieving revision 1.55
  diff -u -r1.54 -r1.55
  --- XSLTC.java	9 Sep 2003 15:44:48 -0000	1.54
  +++ XSLTC.java	3 Oct 2003 16:26:09 -0000	1.55
  @@ -326,12 +326,17 @@
   
   	    // Set the translet class name if not already set
   	    if (_className == null) {
  -		if (name != null)
  +		if (name != null) {
   		    setClassName(name);
  -		else if ((systemId != null) && (!systemId.equals("")))
  +                }
  +		else if (systemId != null && !systemId.equals("")) {
   		    setClassName(Util.baseName(systemId));
  -		else
  +                }
  +                
  +                // Ensure we have a non-empty class name at this point
  +                if (_className == null || _className.length() == 0) {
   		    setClassName("GregorSamsa"); // default translet name
  +                }
   	    }
   
   	    // Get the root node of the abstract syntax tree
  
  
  

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