You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by cu...@apache.org on 2002/03/28 03:15:34 UTC

cvs commit: xml-xalan/test/java/src/org/apache/qetest/xsl StylesheetDatalet.java StylesheetDataletManager.java

curcuru     02/03/27 18:15:34

  Modified:    test/java/src/org/apache/qetest/xsl StylesheetDatalet.java
                        StylesheetDataletManager.java
  Log:
  Fix hole when user-supplied -fileList is passed where -flavor arg wasn't
  properly passed through to underlying datalets; found by pdick
  
  Revision  Changes    Path
  1.5       +25 -1     xml-xalan/test/java/src/org/apache/qetest/xsl/StylesheetDatalet.java
  
  Index: StylesheetDatalet.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/test/java/src/org/apache/qetest/xsl/StylesheetDatalet.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- StylesheetDatalet.java	21 Jun 2001 19:19:34 -0000	1.4
  +++ StylesheetDatalet.java	28 Mar 2002 02:15:34 -0000	1.5
  @@ -72,7 +72,7 @@
    * Datalet for conformance testing of xsl stylesheet files.
    * Should serve as a base class for other XSLT related Datalets.
    * @author Shane_Curcuru@lotus.com
  - * @version $Id: StylesheetDatalet.java,v 1.4 2001/06/21 19:19:34 curcuru Exp $
  + * @version $Id: StylesheetDatalet.java,v 1.5 2002/03/28 02:15:34 curcuru Exp $
    */
   public class StylesheetDatalet implements Datalet
   {
  @@ -127,6 +127,30 @@
        */
       public StylesheetDatalet(String args)
       {
  +        load(args);
  +        setDescription("inputName=" + inputName 
  +                       + " xmlName=" + xmlName 
  +                       + " outputName=" + outputName 
  +                       + " goldName=" + goldName 
  +                       + " flavor=" + flavor);
  +    }
  +
  +
  +    /**
  +     * Initialize this datalet from a string, plus a Properties 
  +     * block to use as our default options.  
  +     * We will parse the command line with whitespace and fill
  +     * in our member variables in order:
  +     * <pre>inputName, xmlName, outputName, goldName, flavor</pre>, 
  +     * if there are too few tokens, remaining variables will default.
  +     */
  +    public StylesheetDatalet(String args, Properties defaults)
  +    {
  +        // First set our defaults and our flavor member
  +        options = new Properties(defaults);
  +        flavor = options.getProperty("flavor", flavor);
  +        // Then set all other items from the string, potentially 
  +        //  overriding the flavor set above
           load(args);
           setDescription("inputName=" + inputName 
                          + " xmlName=" + xmlName 
  
  
  
  1.4       +6 -5      xml-xalan/test/java/src/org/apache/qetest/xsl/StylesheetDataletManager.java
  
  Index: StylesheetDataletManager.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/test/java/src/org/apache/qetest/xsl/StylesheetDataletManager.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- StylesheetDataletManager.java	26 Mar 2002 15:36:55 -0000	1.3
  +++ StylesheetDataletManager.java	28 Mar 2002 02:15:34 -0000	1.4
  @@ -74,7 +74,7 @@
    * 
    *
    * @author shane_curcuru@us.ibm.com
  - * @version $Id: StylesheetDataletManager.java,v 1.3 2002/03/26 15:36:55 curcuru Exp $
  + * @version $Id: StylesheetDataletManager.java,v 1.4 2002/03/28 02:15:34 curcuru Exp $
    */
   public abstract class StylesheetDataletManager // provide static services only
   {
  @@ -327,8 +327,9 @@
               // Skip any lines beginning with # comment char or that are blank
               if ((!line.startsWith(QETEST_COMMENT_CHAR)) && (line.length() > 0))
               {
  -                // Create a Datalet and initialize with the line's contents
  -                StylesheetDatalet d = new StylesheetDatalet(line);
  +                // Create a Datalet and initialize with the line's 
  +                //  contents and default properties
  +                StylesheetDatalet d = new StylesheetDatalet(line, defaults);
   
                   // Also pass over the global runId, if set
                   d.options.put("runId", defaults.getProperty("runId"));
  @@ -460,8 +461,8 @@
           String line = firstLine;
           StylesheetDatalet d = new StylesheetDatalet();
   
  -        // Also pass over the global runId, if set
  -        d.options.put("runId", defaults.getProperty("runId"));
  +        // Also pass over the default properties as well
  +        d.options = new Properties(defaults);
   
           // Parse lines throughout the section to build the datalet
           for (;;)
  
  
  

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