You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by dl...@locus.apache.org on 2000/02/25 20:08:40 UTC

cvs commit: xml-xalan/src/org/apache/xalan/xslt XSLTProcessor.java Process.java

dleslie     00/02/25 11:08:40

  Modified:    src/org/apache/xalan/xslt XSLTProcessor.java Process.java
  Log:
  javadoc cleanup. SPR #DMAN4FYSTE
  
  Revision  Changes    Path
  1.11      +27 -38    xml-xalan/src/org/apache/xalan/xslt/XSLTProcessor.java
  
  Index: XSLTProcessor.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xslt/XSLTProcessor.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- XSLTProcessor.java	2000/02/24 21:11:04	1.10
  +++ XSLTProcessor.java	2000/02/25 19:08:39	1.11
  @@ -108,8 +108,8 @@
       throws SAXException;
   
     /**
  -   * Compile the XSL stylesheet into an internal representation, and use it to
  -   * set the XSLTProcessor Stylesheet property.
  +   * Compile the XSL stylesheet represented by an XSLTInputSource object into an internal representation,
  +   * and use it to set the XSLTProcessor Stylesheet property.
      * This operation is required if the XSLTProcessor is to function as a
      * SAX DocumentHandler.
      * If the Stylesheet property has already been set to non-null, this operation
  @@ -124,7 +124,7 @@
       throws SAXException;
   
     /**
  -   * Given a URL to an XSL stylesheet,
  +   * Given a URL to (or file name of) an XSL stylesheet,
      * Compile the stylesheet into an internal representation, and use it to
      * set the XSLTProcessor Stylesheet property.
      * This operation is required if the XSLTProcessor is to function as a
  @@ -265,15 +265,15 @@
     public XNull createXNull();
   
     /**
  -   * Push a top-level stylesheet parameter.  This value can
  -   * be evaluated via xsl:param-variable.
  +   * Submit a top-level stylesheet parameter.  This value can
  +   * be evaluated in the stylesheet via xsl:param-variable.
      * @param key The name of the param.
      * @param value An XObject that will be used.
      */
     public void setStylesheetParam(String key, XObject value);
   
     /**
  -   * Push a top-level stylesheet parameter.  This value can
  +   * Set a top-level stylesheet parameter.  This value can
      * be evaluated via xsl:param-variable.  Note that the value
      * passed is an expression, and not a string.  This means that
      * setStylesheetParam("foo", "hello"); will look for the
  @@ -286,24 +286,23 @@
     public void setStylesheetParam(String key, String expression);
   
     /**
  -   * Get the current SAX DocumentHandler. May return null.
  +   * Get the current FormatterListener (SAX DocumentHandler), or null if none has been set.
      */
     public DocumentHandler getFormatterListener();
   
     /**
  -   * Set the SAX DocumentHandler.
  +   * Set the FormatterListener (the SAX DocumentHandler).
      */
     public void setFormatterListener(DocumentHandler flistener);
   
     /**
  -   * Get the current SAX DocumentHandler.
  -   * This is the same object as the FormatterListener.
  +   * Get the current SAX DocumentHandler (the same object as the FormatterListener), or null if none has been set.
      */
     public DocumentHandler getDocumentHandler();
   
     /**
      * Set the current SAX DocumentHandler (the same
  -   * object as the FormatterListener.
  +   * object as the FormatterListener).
      */
     public void setDocumentHandler(DocumentHandler listener);
   
  @@ -315,31 +314,24 @@
       throws TooManyListenersException;
   
     /**
  -   * If this is set to true, simple traces of
  -   * template calls are made.
  +   * If set to true, template calls are traced.
      */
     public void setTraceTemplates(boolean b);
   
     /**
  -   * If this is set to true, simple traces of
  -   * template calls are made.
  +   * If set to true, selection events are traced.
      */
     public void setTraceSelect(boolean b);
   
     /**
  -   * If this is set to true, debug diagnostics about
  -   * template children as they are being constructed
  -   * will be written to the m_diagnosticsPrintWriter
  -   * stream.  diagnoseTemplateChildren is false by
  -   * default.
  +   * If set to true (the default is false), as template children are being constructed, debug diagnostics
  +   * are written to the m_diagnosticsPrintWriter
  +   * stream.
      */
     public void setTraceTemplateChildren(boolean b);
   
     /**
  -   * If the quietConflictWarnings property is set to
  -   * true, warnings about pattern conflicts won't be
  -   * printed to the diagnostics stream.
  -   * True by default.
  +   * If set to true (the default), pattern conflict warnings are not printed to the diagnostics stream.
      * @param b true if conflict warnings should be suppressed.
      */
     public void setQuietConflictWarnings(boolean b);
  @@ -351,37 +343,34 @@
     public void removeTraceListener(TraceListener tl);
   
     /**
  -   * If this is set, diagnostics will be
  +   * If set, diagnostics will be
      * written to the m_diagnosticsPrintWriter stream. If
  -   * the value is null, then diagnostics will be turned
  -   * off.
  +   * null, diagnostics are turned off. This convenience method calls
  +   * {@link #setDiagnosticsOutput(java.io.PrintWriter)}.
      */
     public void setDiagnosticsOutput(java.io.OutputStream out);
   
     /**
  -   * If this is set, diagnostics will be
  +   * If set, diagnostics will be
      * written to the m_diagnosticsPrintWriter stream. If
  -   * the value is null, then diagnostics will be turned
  -   * off.
  +   * null, diagnostics are turned off.
      */
     public void setDiagnosticsOutput(java.io.PrintWriter pw);
   
     /**
      * Set the problem listener property.
  -   * The XSL class can have a single listener that can be informed
  -   * of errors and warnings, and can normally control if an exception
  -   * is thrown or not (or the problem listeners can throw their
  -   * own RuntimeExceptions).
  +   * The XSL class can have a single listener to be informed
  +   * of errors and warnings. The problem listener normally controls whether an exception
  +   * is thrown or not (or the problem listeners can throw its own RuntimeException).
      * @param l A ProblemListener interface.
      */
     public void setProblemListener(ProblemListener l);
   
     /**
      * Get the problem listener property.
  -   * The XSL class can have a single listener that can be informed
  -   * of errors and warnings, and can normally control if an exception
  -   * is thrown or not (or the problem listeners can throw their
  -   * own RuntimeExceptions).
  +   * The XSL class can have a single listener to be informed
  +   * of errors and warnings. The problem listener normally controls whether an exception
  +   * is thrown or not (or the problem listener can throw its own RuntimeException).
      * @return A ProblemListener interface.
      */
     public ProblemListener getProblemListener();
  
  
  
  1.15      +32 -14    xml-xalan/src/org/apache/xalan/xslt/Process.java
  
  Index: Process.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xslt/Process.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- Process.java	2000/02/24 21:24:53	1.14
  +++ Process.java	2000/02/25 19:08:39	1.15
  @@ -75,7 +75,7 @@
   // import org.apache.xalan.xpath.xml.xml4j.ProcessXSL;
   
   /**
  - * Handles the Xerces command-line interface.
  + * The main() method handles the Xalan command-line interface.
    */
   public class Process
   {
  @@ -118,10 +118,38 @@
      * Command line interfact to transform the XML according to
      * the instructions found in the XSL stylesheet.
      * <pre>
  -   *    -in inputXMLURL
  -   *    -xsl XSLTransformationURL
  -   *    -out outputFileName
  +   *    -IN inputXMLURL
  +   *    -XSL XSLTransformationURL
  +   *    -OUT outputFileName
  +   *    -LXCIN compiledStylesheetFileNameIn
  +   *    -LXCOUT compiledStylesheetFileNameOut
  +   *    -PARSER fully qualified class name of parser liaison
  +   *    -V (Version info)
  +   *    -QC (Quiet Pattern Conflicts Warnings)
  +   *    -Q  (Quiet Mode)
  +   *    -LF (Use linefeeds only on output -- default is CR/LF)
  +   *    -CR (Use carriage returns only on output -- default is CR/LF)
  +   *    -INDENT (Number of spaces to indent each level in output tree --default is 0)
  +   *    -TT (Trace the templates as they are being called)
  +   *    -TG (Trace each result tree generation event)
  +   *    -TS (Trace each selection event)
  +   *    -TTC (Trace the template children as they are being processed)
  +   *    -VALIDATE (Validate the XML and XSL input -- validation is off by default)
  +   *    -EDUMP [optional]FileName (Do stackdump on error)
  +   *    -XML (Use XML formatter and add XML header)
  +   *    -TEXT (Use simple Text formatter)
  +   *    -HTML (Use HTML formatter)
  +   *    -PARAM name expression (Set a stylesheet parameter)
      * </pre>
  +   *  <p>Use -IN to specify the XML source document. To specify the XSL stylesheet, use -XSL
  +   *  or -LXCIN. To compile an XSL stylesheet for future use as -LXCIN input, use -LXCOUT.</p>
  +   *  <p>Include -PARSER if you supply your own parser liaison class, which is required
  +   *  if you do not use the &xml4j; parser.</p>
  +   *  <p>Use -TEXT if you want the output to include only element values (not element tags with element names and
  +   *  attributes). Use -HTML to write 4.0 transitional HTML (some elements, such as &lt;br&gt;, are
  +   *  not well formed.</p>
  +   *  <p>To set stylesheet parameters from the command line, use -PARAM name expression. If
  +   *  you want to set the parameter to a string value, enclose the string in single quotes (') to
      */
     public static void main( String argv[] )
     {
  @@ -581,16 +609,6 @@
             diagnosticsWriter.println(XSLMessages.createMessage(XSLTErrorResources.ER_NOT_SUCCESSFUL, null) ); //"XSL Process was not successful.");
           }
         }
  -      catch(RuntimeException re)
  -      {
  -		if(doStackDumpOnError)
  -			re.printStackTrace(dumpWriter);
  -		else
  -			System.out.println("Error! " + re.getMessage());
  -
  -          diagnosticsWriter.println(XSLMessages.createMessage(XSLTErrorResources.ER_NOT_SUCCESSFUL, null) ); //"XSL Process was not successful.");
  -      }
  -
         catch(MalformedURLException mue)
         {
           if(doStackDumpOnError)