curcuru     00/12/19 07:00:58

  Modified:    test/java/src/org/apache/qetest/xsl
                        XSLProcessorTestBase.java
  Log:
  Add simplistic filenameToURL utility method
  
  Revision  Changes    Path
  1.4       +19 -1     
xml-xalan/test/java/src/org/apache/qetest/xsl/XSLProcessorTestBase.java
  
  Index: XSLProcessorTestBase.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/test/java/src/org/apache/qetest/xsl/XSLProcessorTestBase.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- XSLProcessorTestBase.java 2000/12/12 16:01:02     1.3
  +++ XSLProcessorTestBase.java 2000/12/19 15:00:57     1.4
  @@ -91,7 +91,7 @@
    * <li>runErr</li>
    * </ul>
    * @author [EMAIL PROTECTED]
  - * @version $Id: XSLProcessorTestBase.java,v 1.3 2000/12/12 16:01:02 curcuru 
Exp $
  + * @version $Id: XSLProcessorTestBase.java,v 1.4 2000/12/19 15:00:57 curcuru 
Exp $
    */
   public class XSLProcessorTestBase extends FileBasedTest
   {
  @@ -677,6 +677,24 @@
       //-----------------------------------------------------
       //-------- Other useful and utility methods --------
       //-----------------------------------------------------
  +
  +    /**
  +     * Worker method to translate a String filename to URL.  
  +     * Note: This method is not necessarily proven to get the 
  +     * correct URL for every possible kind of filename.
  +     * @param String path\filename of test file
  +     * @return URL to pass to SystemId
  +     */
  +    public static String filenameToURL(String filename)
  +    {
  +        File f = new File(filename);
  +        String tmp = f.getAbsolutePath();
  +         if (File.separatorChar == '\\') {
  +             tmp = tmp.replace('\\', '/');
  +         }
  +        return "file:///" + tmp;
  +    }
  +
   
       /**
        * Worker method to fixup pathing for diagnostics.
  
  
  

Reply via email to