sboag       2002/06/08 14:23:00

  Modified:    java/src/org/apache/xalan/res XSLTErrorResources.properties
               java/src/org/apache/xalan/transformer StackGuard.java
  Log:
  Moved hard coded strings for StackGuard error message to properties file.
  
  Revision  Changes    Path
  1.4       +4 -1      
xml-xalan/java/src/org/apache/xalan/res/XSLTErrorResources.properties
  
  Index: XSLTErrorResources.properties
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/res/XSLTErrorResources.properties,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- XSLTErrorResources.properties     7 Jun 2002 17:13:54 -0000       1.3
  +++ XSLTErrorResources.properties     8 Jun 2002 21:23:00 -0000       1.4
  @@ -585,4 +585,7 @@
   optionENTITYRESOLVER=   [-ENTITYRESOLVER full class name (EntityResolver to 
be used to resolve entities)]
   optionCONTENTHANDLER=   [-CONTENTHANDLER full class name (ContentHandler to 
be used to serialize output)]
   optionLINENUMBERS=   [-L use line numbers for source document]
  -diagTiming= --------- Transform of {0} via {1} took {2} ms
  \ No newline at end of file
  +diagTiming= --------- Transform of {0} via {1} took {2} ms
  +recursionTooDeep=Template nesting too deep. nesting = {0}, template {1} {2}
  +nameIs=name is 
  +matchPatternIs=match pattern is 
  
  
  
  1.8       +13 -7     
xml-xalan/java/src/org/apache/xalan/transformer/StackGuard.java
  
  Index: StackGuard.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/transformer/StackGuard.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- StackGuard.java   8 Jun 2002 20:41:00 -0000       1.7
  +++ StackGuard.java   8 Jun 2002 21:23:00 -0000       1.8
  @@ -59,10 +59,8 @@
   //import org.w3c.dom.Node;
   //import org.w3c.dom.Text;
   //import org.w3c.dom.Element;
  -import java.io.PrintWriter;
  -import java.io.StringWriter;
  -
   import javax.xml.transform.TransformerException;
  +import org.apache.xalan.res.XSLMessages;
   import org.apache.xalan.templates.Constants;
   import org.apache.xalan.templates.ElemTemplate;
   import org.apache.xalan.templates.ElemTemplateElement;
  @@ -208,10 +206,18 @@
        
        if (loopCount >= m_recursionLimit)
        {
  -             throw new TransformerException("Template nesting too deep. 
nesting = "+loopCount+
  -                ", template "+((null == template.getName()) ? "name = " : 
"match = ")+
  -                ((null != template.getName()) ? 
template.getName().toString() 
  -                : template.getMatch().getPatternString()));
  +             // throw new TransformerException("Template nesting too deep. 
nesting = "+loopCount+
  +             //   ", template "+((null == template.getName()) ? "name = " : 
"match = ")+
  +             //   ((null != template.getName()) ? 
template.getName().toString() 
  +             //   : template.getMatch().getPatternString()));
  +             
  +             String idIs = XSLMessages.createMessage(((null != 
template.getName()) ? "nameIs" : "matchPatternIs"), null);
  +             Object[] msgArgs = new Object[]{ new Integer(loopCount), idIs, 
  +                     ((null != template.getName()) ? 
template.getName().toString() 
  +                : template.getMatch().getPatternString()) };
  +             String msg = XSLMessages.createMessage("recursionTooDeep", 
msgArgs);
  +
  +             throw new TransformerException(msg);
        }
       }
     }
  
  
  

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

Reply via email to