sboag       02/05/22 13:12:53

  Modified:    java/src/org/apache/xalan/res XSLMessages.java
                        XSLTErrorResources.properties
               java/src/org/apache/xalan/xslt Process.java
               java/src/org/apache/xpath/functions FuncPosition.java
  Log:
  Fixed hard coded string for timing diagnostics.
  
  Revision  Changes    Path
  1.8       +28 -0     xml-xalan/java/src/org/apache/xalan/res/XSLMessages.java
  
  Index: XSLMessages.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/res/XSLMessages.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- XSLMessages.java  13 May 2002 21:20:17 -0000      1.7
  +++ XSLMessages.java  22 May 2002 20:12:53 -0000      1.8
  @@ -265,6 +265,33 @@
       else
         return "Could not load any resource bundles.";
     }
  +  
  +  /**
  +   * Creates a message from the specified key and replacement
  +   * arguments, localized to the given locale.
  +   *
  +   * @param errorCode The key for the message text.
  +   * @param args      The arguments to be used as replacement text
  +   *                  in the message created.
  +   *
  +   * @return The formatted message string.
  +   */
  +  public static final String createMessage(String msgKey, Object args[])  //throws 
Exception 
  +  {
  +
  +    if (XSLTBundle == null)
  +      XSLTBundle =
  +        loadResourceBundle(XSLT_ERROR_RESOURCES);
  +
  +    ResourceBundle fResourceBundle = XSLTBundle;
  +
  +    if (fResourceBundle != null)
  +    {
  +      return createMsg(fResourceBundle, msgKey, args);
  +    }
  +    else
  +      return "Could not load any resource bundles.";
  +  }
   
     /**
      * Creates a message from the specified key and replacement
  @@ -294,6 +321,7 @@
       else
         return "Could not load any resource bundles.";
     }
  +  
   
     /**
      * Creates a message from the specified key and replacement
  
  
  
  1.2       +1 -0      
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.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XSLTErrorResources.properties     12 May 2002 18:34:03 -0000      1.1
  +++ XSLTErrorResources.properties     22 May 2002 20:12:53 -0000      1.2
  @@ -564,3 +564,4 @@
   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
  
  
  
  1.49      +7 -4      xml-xalan/java/src/org/apache/xalan/xslt/Process.java
  
  Index: Process.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/xslt/Process.java,v
  retrieving revision 1.48
  retrieving revision 1.49
  diff -u -r1.48 -r1.49
  --- Process.java      12 May 2002 18:34:03 -0000      1.48
  +++ Process.java      22 May 2002 20:12:53 -0000      1.49
  @@ -916,10 +916,13 @@
           long millisecondsDuration = stop - start;
   
           if (doDiag)
  -          diagnosticsWriter.println("\n\n========\nTransform of "
  -                                    + inFileName + " via " + xslFileName
  -                                    + " took " + millisecondsDuration
  -                                    + " ms");
  +        {
  +             Object[] msgArgs = new Object[]{ inFileName, xslFileName, new 
Long(millisecondsDuration) };
  +             String msg = XSLMessages.createMessage("diagTiming", msgArgs);
  +             diagnosticsWriter.println('\n');
  +             diagnosticsWriter.println(msg);
  +        }
  +          
         }
         catch (Throwable throwable)
         {
  
  
  
  1.8       +1 -1      xml-xalan/java/src/org/apache/xpath/functions/FuncPosition.java
  
  Index: FuncPosition.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/functions/FuncPosition.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- FuncPosition.java 13 May 2002 21:07:44 -0000      1.7
  +++ FuncPosition.java 22 May 2002 20:12:53 -0000      1.8
  @@ -107,7 +107,7 @@
       if (null != iter)
       {
         int prox = iter.getProximityPosition(xctxt);
  -
  + 
         // System.out.println("FuncPosition- prox: "+prox);
         return prox;
       }
  
  
  

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

Reply via email to