sboag       00/11/22 15:26:22

  Modified:    java/src/org/apache/xalan/processor CompiledTemplate.java
                        CompilingStylesheetHandler.java
                        ProcessorAttributeSet.java ProcessorCharacters.java
                        ProcessorDecimalFormat.java
                        ProcessorGlobalParamDecl.java
                        ProcessorGlobalVariableDecl.java
                        ProcessorImport.java ProcessorInclude.java
                        ProcessorKey.java ProcessorLRE.java
                        ProcessorNamespaceAlias.java
                        ProcessorOutputElem.java
                        ProcessorPreserveSpace.java
                        ProcessorStripSpace.java
                        ProcessorStylesheetDoc.java
                        ProcessorStylesheetElement.java
                        ProcessorTemplate.java ProcessorTemplateElem.java
                        ProcessorText.java ProcessorUnknown.java
                        StopParseException.java StylesheetHandler.java
                        StylesheetPIHandler.java XSLProcessorVersion.java
                        XSLTAttributeDef.java XSLTElementDef.java
                        XSLTElementProcessor.java
  Log:
  Javadoc complete.  Some of these files got wacked by JBuilder's
  trimming of trailing spaces (which I didn't realize was on), so if
  you need to do diffs, you should use a diff problem that can turn
  off comparisons based on trailing spaces.
  
  Revision  Changes    Path
  1.8       +22 -19    
xml-xalan/java/src/org/apache/xalan/processor/CompiledTemplate.java
  
  Index: CompiledTemplate.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/processor/CompiledTemplate.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- CompiledTemplate.java     2000/11/13 16:26:42     1.7
  +++ CompiledTemplate.java     2000/11/22 23:25:49     1.8
  @@ -70,11 +70,14 @@
   extends ElemTemplate 
   implements java.io.Serializable
   {
  -  // Object[] m_interpretArray is used to bind to nodes we don't yet
  -  // know how to compile. Set at construction.
  -  // This array resembles the DOM's getChildren().item(), but includes
  -  // some things that aren't children, and is our primary access
  -  // point for its contents even when they are kids.
  +  /**
  +   * Object[] m_interpretArray is used to bind to nodes we don't yet
  +  * know how to compile. Set at construction.
  +  * This array resembles the DOM's getChildren().item(), but includes
  +  * some things that aren't children, and is our primary access
  +  * point for its contents even when they are kids.
  +  * @serial
  +  */
     protected java.lang.Object[] m_interpretArray;
   
     // Namespace context tracking. Note that this is dynamic state
  @@ -120,9 +123,9 @@
      * in the generated code, for debugging purposes.)
      */
     public CompiledTemplate(ElemTemplate original,
  -                       int lineNumber, int columnNumber,
  -                       String publicId,String systemId,
  -                       java.lang.Object[] interpretArray)
  +                          int lineNumber, int columnNumber,
  +                          String publicId,String systemId,
  +                          java.lang.Object[] interpretArray)
     {
       SAXSourceLocator locator = new SAXSourceLocator();
       locator.setLineNumber(lineNumber);
  @@ -148,17 +151,17 @@
   
       for(int i=0;i<m_interpretArray.length;++i)
         {
  -     if(m_interpretArray[i] instanceof 
org.apache.xalan.templates.ElemTemplateElement)
  -       {
  +        if(m_interpretArray[i] instanceof 
org.apache.xalan.templates.ElemTemplateElement)
  +          {
               org.apache.xalan.templates.ElemTemplateElement ete=
  -           (org.apache.xalan.templates.ElemTemplateElement)
  -           m_interpretArray[i];
  -         
  +              (org.apache.xalan.templates.ElemTemplateElement)
  +              m_interpretArray[i];
  +            
               // Append alone is not enough; it's lightweight, and assumes
               // the child had no previous parent. Need to remove first.
               // (We know that there _was_ a previous parent, of course!)
               appendChild(ete.getParentElem().removeChild(ete));
  -       }
  +          }
         }
     } // Constructor initialization ends
     
  @@ -168,9 +171,9 @@
      * when the actual template code is synthesized.
      */
     public abstract void execute(
  -                       org.apache.xalan.transformer.TransformerImpl 
transformer,
  -                   org.w3c.dom.Node sourceNode,
  -                   org.apache.xalan.utils.QName mode)
  +                          org.apache.xalan.transformer.TransformerImpl 
transformer,
  +                      org.w3c.dom.Node sourceNode,
  +                      org.apache.xalan.utils.QName mode)
          throws javax.xml.transform.TransformerException;
     
     /** During deserialization, reinstantiate the transient thread-table
  @@ -178,9 +181,9 @@
     private void readObject(java.io.ObjectInputStream in)
        throws java.io.IOException, ClassNotFoundException
     {
  -     in.defaultReadObject();   
  +        in.defaultReadObject();   
   
  -     m_nsThreadContexts=new java.util.Hashtable();
  +        m_nsThreadContexts=new java.util.Hashtable();
     }
     
   }
  
  
  
  1.17      +60 -60    
xml-xalan/java/src/org/apache/xalan/processor/CompilingStylesheetHandler.java
  
  Index: CompilingStylesheetHandler.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/processor/CompilingStylesheetHandler.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- CompilingStylesheetHandler.java   2000/11/13 16:26:42     1.16
  +++ CompilingStylesheetHandler.java   2000/11/22 23:25:49     1.17
  @@ -124,7 +124,7 @@
      * Run standard cleanup of the internal representation,
      * then start trying to replace that rep with custom code.
      *
  -   * @exception javax.xml.transform.TransformerException Any SAX exception, 
possibly
  +   * @exception org.xml.sax.SAXException Any SAX exception, possibly
      *            wrapping another exception.
      * @see org.xml.sax.ContentHandler#endDocument
      */
  @@ -239,7 +239,7 @@
       try
       {
           // public class ACompiledTemplate000... 
  -             // extends CompiledTemplate (partly abstract superclass)
  +                // extends CompiledTemplate (partly abstract superclass)
           org.apache.xalan.utils.synthetic.Class tClass=
               org.apache.xalan.utils.synthetic.Class.declareClass(className);
           tClass.setModifiers(java.lang.reflect.Modifier.PUBLIC);
  @@ -254,12 +254,12 @@
           ctor.addParameter(tClass.forClass(ElemTemplate.class),"original");
           
ctor.addParameter(tClass.forName("java.lang.Object[]"),"interpretArray");
           ctor.getBody().append(
  -                     "super(original,\n"
  -                     
+'\t'+source.getLineNumber()+','+source.getColumnNumber()+",\n"
  -                     +'\t'+makeQuotedString(source.getPublicId())+",\n"
  -                     +'\t'+makeQuotedString(source.getSystemId())+",\n"
  -                     +"\tinterpretArray);\n"
  -               );
  +                        "super(original,\n"
  +                        
+'\t'+source.getLineNumber()+','+source.getColumnNumber()+",\n"
  +                        +'\t'+makeQuotedString(source.getPublicId())+",\n"
  +                        +'\t'+makeQuotedString(source.getSystemId())+",\n"
  +                        +"\tinterpretArray);\n"
  +                  );
   
           // vector built during compilation, winds up in m_interpretArray
           Vector interpretVector=new Vector();
  @@ -286,10 +286,10 @@
           // If there are no kids, the body is a no-op.
           ElemTemplateElement firstChild = source.getFirstChildElem();
           if(null == firstChild)
  -       {
  -         exec.getBody().append("//empty template");
  -       }
  -     else
  +          {
  +            exec.getBody().append("//empty template");
  +          }
  +        else
           {
             // Body startup
             // **** FIRST DRAFT, I'm continuing to use ResultTreeHandler
  @@ -317,19 +317,19 @@
                 +"if (check)\n"
                 +"  transformer.getStackGuard().push(this, sourceNode);\n"
                 +"String avtStringedValue; // ***** Optimize away?\n\n"
  -               // Establish dynamic namespace context for this invocation
  -                       +"org.xml.sax.helpers.NamespaceSupport nsSupport=new 
org.xml.sax.helpers.NamespaceSupport();\n"
  -                       +"org.xml.sax.helpers.NamespaceSupport 
savedNsSupport=(org.xml.sax.helpers.NamespaceSupport)m_nsThreadContexts.get(Thread.currentThread());\n"
  -                       
+"m_nsThreadContexts.put(Thread.currentThread(),nsSupport);\n"
  -                       );
  +                  // Establish dynamic namespace context for this invocation
  +                          +"org.xml.sax.helpers.NamespaceSupport 
nsSupport=new org.xml.sax.helpers.NamespaceSupport();\n"
  +                          +"org.xml.sax.helpers.NamespaceSupport 
savedNsSupport=(org.xml.sax.helpers.NamespaceSupport)m_nsThreadContexts.get(Thread.currentThread());\n"
  +                          
+"m_nsThreadContexts.put(Thread.currentThread(),nsSupport);\n"
  +                          );
             
             compileChildTemplates(source,body,interpretVector);
             
  -               // Body Cleanup
  +                  // Body Cleanup
             body.append(
  -               // Restore dynamic namespace context for this invocation
  -                       "if(null!=savedNsSupport) 
m_nsThreadContexts.put(Thread.currentThread(),savedNsSupport);\n"
  -                       +"else 
m_nsThreadContexts.remove(Thread.currentThread());\n\n"
  +                  // Restore dynamic namespace context for this invocation
  +                          "if(null!=savedNsSupport) 
m_nsThreadContexts.put(Thread.currentThread(),savedNsSupport);\n"
  +                          +"else 
m_nsThreadContexts.remove(Thread.currentThread());\n\n"
                 +"// Decrement infinite-loop check\n"
                 +"if (check)\n"
                 +"  transformer.getStackGuard().pop();\n"
  @@ -391,18 +391,18 @@
     {
       ++uniqueVarSuffix; // Maintain unique variable naming
         
  -     switch(kid.getXSLToken())
  -     {
  -     case Constants.ELEMNAME_LITERALRESULT:
  +        switch(kid.getXSLToken())
  +        {
  +        case Constants.ELEMNAME_LITERALRESULT:
           
compileElemLiteralResult((ElemLiteralResult)kid,body,interpretVector);
  -             break;
  +                break;
   
  -             // TODO: ***** Redirection of attr value not working yet.
  -     //case Constants.ELEMNAME_ATTRIBUTE:
  +                // TODO: ***** Redirection of attr value not working yet.
  +        //case Constants.ELEMNAME_ATTRIBUTE:
       //    compileElemAttribute((ElemAttribute)kid,body,interpretVector);
  -     //    break;
  -             
  -     default:
  +        //    break;
  +                
  +        default:
           // Safety net: We don't yet know how to compile this
           // type of node, so instead we'll pass it into the
           // compiled instance and invoke it interpretively.
  @@ -411,8 +411,8 @@
           body.append(
               
"((org.apache.xalan.templates.ElemTemplateElement)m_interpretArray["+offset+"]).execute(transformer,sourceNode,mode);\n"
               );
  -             break;
  -     }
  +                break;
  +        }
     }  
     
     void compileElemLiteralResult(ElemLiteralResult ele,StringBuffer 
body,Vector interpretVector)
  @@ -618,9 +618,9 @@
     // Used to prepare literal string arguments.
     String makeQuotedString(String in)
     {
  -     if(in==null)
  -             return "null";
  -     
  +        if(in==null)
  +                return "null";
  +        
       StringBuffer out=new StringBuffer("\""); // don't use '"', it's taken as 
int
         
       int startpos=0,quotepos;
  @@ -707,10 +707,10 @@
           +"// warn(templateChild, sourceNode, \"Trying to add attribute after 
element child has been added, ignoring...\");\n"
           +"}\n"
           );
  -     
  -     // This check was done in the interpretive code... is it Really Needed?
  -     if(null==origAttrName)
  -             return;
  +        
  +        // This check was done in the interpretive code... is it Really 
Needed?
  +        if(null==origAttrName)
  +                return;
   
       body.append("boolean "+attributeHandled+"=false;\n");
   
  @@ -834,13 +834,13 @@
             kid!=null;
             kid=kid.getNextSiblingElem())
            {
  -        //TODO: *PROBLEM* NEED EQUIVALENT? Node is Going Away...
  -        // body.append("transformer.pushElemTemplateElement(kid);\n");
  +           //TODO: *PROBLEM* NEED EQUIVALENT? Node is Going Away...
  +           // body.append("transformer.pushElemTemplateElement(kid);\n");
   
              compileElemTemplateElement(kid,body,interpretVector);
   
  -        //TODO: *PROBLEM* NEED EQUIVALENT? Node is Going Away...
  -        // body.append("transformer.popElemTemplateElement(kid);\n");
  +           //TODO: *PROBLEM* NEED EQUIVALENT? Node is Going Away...
  +           // body.append("transformer.popElemTemplateElement(kid);\n");
            }
   
        // End the class wrapper
  @@ -910,24 +910,24 @@
           return null;
       }
   
  -     // Try to pick up the same classpath we're executing under. That
  -     // ought to include everything in Xalan and the standard libraries.
  +        // Try to pick up the same classpath we're executing under. That
  +        // ought to include everything in Xalan and the standard libraries.
       String classpath=System.getProperty ("java.class.path");
  -     
  -     // If compiling with the -g switch (Java debugging), we should retain 
  -     // the Java source code to support debugging into the synthesized class.
  -     // Some additional diagnostics are also turned on as a side effect.
  -     // TODO: Find a better place to put the debugging control.
  -     String javac_options=
  -                     
System.getProperty("org.apache.xalan.processor.CompilingStylesheetHandler.options","");
  -     boolean debug=(javac_options.indexOf("-g")>=0);
  -
  -     // Run the compilation. Encapsulates the fallbacks and
  -     // workarounds needed to achieve this in various environments.
  -     JavaUtils.setDebug(debug);
  +        
  +        // If compiling with the -g switch (Java debugging), we should 
retain 
  +        // the Java source code to support debugging into the synthesized 
class.
  +        // Some additional diagnostics are also turned on as a side effect.
  +        // TODO: Find a better place to put the debugging control.
  +        String javac_options=
  +                        
System.getProperty("org.apache.xalan.processor.CompilingStylesheetHandler.options","");
  +        boolean debug=(javac_options.indexOf("-g")>=0);
  +
  +        // Run the compilation. Encapsulates the fallbacks and
  +        // workarounds needed to achieve this in various environments.
  +        JavaUtils.setDebug(debug);
       boolean compileOK=
  -             JavaUtils.JDKcompile(filename,classpath);
  -     
  +                JavaUtils.JDKcompile(filename,classpath);
  +        
       if (compileOK)
       {
           if(debug)
  @@ -1027,7 +1027,7 @@
       // that helps.
       String className=
           basename
  -             +"On"
  +                +"On"
           +intAddr
           +"at"
           +new java.util.Date().getTime() // msec since 1970 epoch
  
  
  
  1.5       +6 -6      
xml-xalan/java/src/org/apache/xalan/processor/ProcessorAttributeSet.java
  
  Index: ProcessorAttributeSet.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/processor/ProcessorAttributeSet.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ProcessorAttributeSet.java        2000/11/13 16:26:42     1.4
  +++ ProcessorAttributeSet.java        2000/11/22 23:25:50     1.5
  @@ -82,10 +82,10 @@
      *        performed.
      * @param rawName The raw XML 1.0 name (with prefix), or the
      *        empty string if raw names are not available.
  -   * @param atts The attributes attached to the element.  If
  +   * @param attributes The attributes attached to the element.  If
      *        there are no attributes, it shall be an empty
      *        Attributes object.
  -   * NEEDSDOC @param attributes
  +   * 
      * @see org.apache.xalan.processor.StylesheetHandler#startElement
      * @see org.xml.sax.ContentHandler#startElement
      * @see org.xml.sax.ContentHandler#endElement
  @@ -125,10 +125,10 @@
      * @param name The element type name.
      * @param attributes The specified or defaulted attributes.
      *
  -   * NEEDSDOC @param handler
  -   * NEEDSDOC @param uri
  -   * NEEDSDOC @param localName
  -   * NEEDSDOC @param rawName
  +   * @param handler non-null reference to current StylesheetHandler that is 
constructing the Templates.
  +   * @param uri The Namespace URI, or an empty string.
  +   * @param localName The local name (without prefix), or empty string if 
not namespace processing.
  +   * @param rawName The qualified name (with prefix).
      */
     public void endElement(
             StylesheetHandler handler, String uri, String localName, String 
rawName)
  
  
  
  1.6       +7 -5      
xml-xalan/java/src/org/apache/xalan/processor/ProcessorCharacters.java
  
  Index: ProcessorCharacters.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/processor/ProcessorCharacters.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ProcessorCharacters.java  2000/11/13 16:26:42     1.5
  +++ ProcessorCharacters.java  2000/11/22 23:25:50     1.6
  @@ -78,7 +78,7 @@
      * Receive notification of the start of the non-text event.  This
      * is sent to the current processor when any non-text event occurs.
      *
  -   * NEEDSDOC @param handler
  +   * @param handler non-null reference to current StylesheetHandler that is 
constructing the Templates.
      */
     public void startNonText(StylesheetHandler handler) throws 
org.xml.sax.SAXException
     {
  @@ -128,12 +128,12 @@
      * Receive notification of character data inside an element.
      *
      *
  -   * NEEDSDOC @param handler
  +   * @param handler non-null reference to current StylesheetHandler that is 
constructing the Templates.
      * @param ch The characters.
      * @param start The start position in the character array.
      * @param length The number of characters to use from the
      *               character array.
  -   * @exception javax.xml.transform.TransformerException Any SAX exception, 
possibly
  +   * @throws org.xml.sax.SAXException Any SAX exception, possibly
      *            wrapping another exception.
      * @see org.xml.sax.ContentHandler#characters
      */
  @@ -197,9 +197,11 @@
     private ElemText m_xslTextElement;
   
     /**
  -   * Set the current setXslTextElement
  +   * Set the current setXslTextElement. The xsl:text 
  +   * processor will call this to set a preserve space state.
      *
  -   * NEEDSDOC @param xslTextElement
  +   * @param xslTextElement The current xslTextElement that 
  +   *                       is preserving state, or null.
      */
     void setXslTextElement(ElemText xslTextElement)
     {
  
  
  
  1.4       +7 -3      
xml-xalan/java/src/org/apache/xalan/processor/ProcessorDecimalFormat.java
  
  Index: ProcessorDecimalFormat.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/processor/ProcessorDecimalFormat.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ProcessorDecimalFormat.java       2000/11/13 16:26:42     1.3
  +++ ProcessorDecimalFormat.java       2000/11/22 23:25:51     1.4
  @@ -63,7 +63,12 @@
   
   /**
    * <meta name="usage" content="internal"/>
  - * NEEDSDOC Class ProcessorDecimalFormat <needs-comment/>
  + * Process xsl:decimal-format by creating a DecimalFormatProperties 
  + * object and passing it to the stylesheet.
  + * 
  + * @see org.apache.xalan.templates.Stylesheet#setDecimalFormat
  + * @see org.apache.xalan.templates.DecimalFormatProperties
  + * @see <a href="http://www.w3.org/TR/xslt#format-number";>format-number in 
XSLT Specification</a>
    */
   class ProcessorDecimalFormat extends XSLTElementProcessor
   {
  @@ -80,10 +85,9 @@
      *        performed.
      * @param rawName The raw XML 1.0 name (with prefix), or the
      *        empty string if raw names are not available.
  -   * @param atts The attributes attached to the element.  If
  +   * @param attributes The attributes attached to the element.  If
      *        there are no attributes, it shall be an empty
      *        Attributes object.
  -   * NEEDSDOC @param attributes
      * @see org.apache.xalan.processor.StylesheetHandler#startElement
      * @see org.apache.xalan.processor.StylesheetHandler#endElement
      * @see org.xml.sax.ContentHandler#startElement
  
  
  
  1.5       +8 -7      
xml-xalan/java/src/org/apache/xalan/processor/ProcessorGlobalParamDecl.java
  
  Index: ProcessorGlobalParamDecl.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/processor/ProcessorGlobalParamDecl.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ProcessorGlobalParamDecl.java     2000/11/13 16:26:42     1.4
  +++ ProcessorGlobalParamDecl.java     2000/11/22 23:25:51     1.5
  @@ -75,10 +75,11 @@
      * template element, and then push it onto the current template
      * element stack.
      *
  -   * NEEDSDOC @param handler
  -   * NEEDSDOC @param elem
  +   * @param handler non-null reference to current StylesheetHandler that is 
constructing the Templates.
  +   * @param elem The non-null reference to the ElemParam element.
      *
  -   * @throws TransformerException
  +   * @throws org.xml.sax.SAXException Any SAX exception, possibly
  +   *            wrapping another exception.
      */
     protected void appendAndPush(
             StylesheetHandler handler, ElemTemplateElement elem)
  @@ -95,10 +96,10 @@
      * @param name The element type name.
      * @param attributes The specified or defaulted attributes.
      *
  -   * NEEDSDOC @param handler
  -   * NEEDSDOC @param uri
  -   * NEEDSDOC @param localName
  -   * NEEDSDOC @param rawName
  +   * @param handler non-null reference to current StylesheetHandler that is 
constructing the Templates.
  +   * @param uri The Namespace URI, or an empty string.
  +   * @param localName The local name (without prefix), or empty string if 
not namespace processing.
  +   * @param rawName The qualified name (with prefix).
      */
     public void endElement(
             StylesheetHandler handler, String uri, String localName, String 
rawName)
  
  
  
  1.5       +8 -7      
xml-xalan/java/src/org/apache/xalan/processor/ProcessorGlobalVariableDecl.java
  
  Index: ProcessorGlobalVariableDecl.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/processor/ProcessorGlobalVariableDecl.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ProcessorGlobalVariableDecl.java  2000/11/13 16:26:42     1.4
  +++ ProcessorGlobalVariableDecl.java  2000/11/22 23:25:51     1.5
  @@ -75,10 +75,11 @@
      * template element, and then push it onto the current template
      * element stack.
      *
  -   * NEEDSDOC @param handler
  -   * NEEDSDOC @param elem
  +   * @param handler non-null reference to current StylesheetHandler that is 
constructing the Templates.
  +   * @param elem The non-null reference to the ElemVariable element.
      *
  -   * @throws TransformerException
  +   * @throws org.xml.sax.SAXException Any SAX exception, possibly
  +   *            wrapping another exception.
      */
     protected void appendAndPush(
             StylesheetHandler handler, ElemTemplateElement elem)
  @@ -95,10 +96,10 @@
      * @param name The element type name.
      * @param attributes The specified or defaulted attributes.
      *
  -   * NEEDSDOC @param handler
  -   * NEEDSDOC @param uri
  -   * NEEDSDOC @param localName
  -   * NEEDSDOC @param rawName
  +   * @param handler non-null reference to current StylesheetHandler that is 
constructing the Templates.
  +   * @param uri The Namespace URI, or an empty string.
  +   * @param localName The local name (without prefix), or empty string if 
not namespace processing.
  +   * @param rawName The qualified name (with prefix).
      */
     public void endElement(
             StylesheetHandler handler, String uri, String localName, String 
rawName)
  
  
  
  1.8       +1 -2      
xml-xalan/java/src/org/apache/xalan/processor/ProcessorImport.java
  
  Index: ProcessorImport.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/processor/ProcessorImport.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ProcessorImport.java      2000/11/13 16:26:49     1.7
  +++ ProcessorImport.java      2000/11/22 23:25:52     1.8
  @@ -97,10 +97,9 @@
      *        performed.
      * @param rawName The raw XML 1.0 name (with prefix), or the
      *        empty string if raw names are not available.
  -   * @param atts The attributes attached to the element.  If
  +   * @param attributes The attributes attached to the element.  If
      *        there are no attributes, it shall be an empty
      *        Attributes object.
  -   * NEEDSDOC @param attributes
      */
     public void startElement(
             StylesheetHandler handler, String uri, String localName, String 
rawName, Attributes attributes)
  
  
  
  1.12      +19 -12    
xml-xalan/java/src/org/apache/xalan/processor/ProcessorInclude.java
  
  Index: ProcessorInclude.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/processor/ProcessorInclude.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- ProcessorInclude.java     2000/11/16 03:22:21     1.11
  +++ ProcessorInclude.java     2000/11/22 23:25:52     1.12
  @@ -102,7 +102,8 @@
     /**
      * Get the base identifier with which this stylesheet is associated.
      *
  -   * NEEDSDOC ($objectName$) @return
  +   * @return non-null reference to the href attribute string, or 
  +   *         null if setHref has not been called.
      */
     public String getHref()
     {
  @@ -112,10 +113,11 @@
     /**
      * Get the base identifier with which this stylesheet is associated.
      *
  -   * NEEDSDOC @param baseIdent
  +   * @param baseIdent Should be a non-null reference to a valid URL string.
      */
     public void setHref(String baseIdent)
     {
  +    // Validate?
       m_href = baseIdent;
     }
   
  @@ -131,10 +133,12 @@
      *        performed.
      * @param rawName The raw XML 1.0 name (with prefix), or the
      *        empty string if raw names are not available.
  -   * @param atts The attributes attached to the element.  If
  +   * @param attributes The attributes attached to the element.  If
      *        there are no attributes, it shall be an empty
      *        Attributes object.
  -   * NEEDSDOC @param attributes
  +   *
  +   * @throws org.xml.sax.SAXException Any SAX exception, possibly
  +   *            wrapping another exception.
      */
     public void startElement(
             StylesheetHandler handler, String uri, String localName, String 
rawName, Attributes attributes)
  @@ -162,16 +166,19 @@
     }
   
     /**
  -   * NEEDSDOC Method parse 
  -   *
  +   * Set off a new parse for an included or imported stylesheet.  This will 
  +   * set the [EMAIL PROTECTED] StylesheetHandler} to a new state, and 
recurse in with 
  +   * a new set of parse events.  Once this function returns, the state of 
  +   * the StylesheetHandler should be restored.
      *
  -   * NEEDSDOC @param handler
  -   * NEEDSDOC @param uri
  -   * NEEDSDOC @param localName
  -   * NEEDSDOC @param rawName
  -   * NEEDSDOC @param attributes
  +   * @param handler non-null reference to current StylesheetHandler that is 
constructing the Templates.
  +   * @param uri The Namespace URI, which should be the XSLT namespace.
  +   * @param localName The local name (without prefix), which should be 
"include" or "import".
  +   * @param rawName The qualified name (with prefix).
  +   * @param attributes The list of attributes on the xsl:include or 
xsl:import element.
      *
  -   * @throws TransformerException
  +   * @throws org.xml.sax.SAXException Any SAX exception, possibly
  +   *            wrapping another exception.
      */
     protected void parse(
             StylesheetHandler handler, String uri, String localName, String 
rawName, Attributes attributes)
  
  
  
  1.8       +3 -6      
xml-xalan/java/src/org/apache/xalan/processor/ProcessorKey.java
  
  Index: ProcessorKey.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/processor/ProcessorKey.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ProcessorKey.java 2000/11/13 16:26:50     1.7
  +++ ProcessorKey.java 2000/11/22 23:25:52     1.8
  @@ -82,9 +82,6 @@
   class ProcessorKey extends XSLTElementProcessor
   {
   
  -  /** NEEDSDOC Field FUNC_KEY_STRING          */
  -  static final String FUNC_KEY_STRING = "key";
  -
     /**
      * Receive notification of the start of an xsl:key element.
      *
  @@ -97,10 +94,9 @@
      *        performed.
      * @param rawName The raw XML 1.0 name (with prefix), or the
      *        empty string if raw names are not available.
  -   * @param atts The attributes attached to the element.  If
  +   * @param attributes The attributes attached to the element.  If
      *        there are no attributes, it shall be an empty
      *        Attributes object.
  -   * NEEDSDOC @param attributes
      */
     public void startElement(
             StylesheetHandler handler, String uri, String localName, String 
rawName, Attributes attributes)
  @@ -154,7 +150,8 @@
         {
           String valueString = attributes.getValue(i);
   
  -        if (valueString.indexOf(FUNC_KEY_STRING + "(") >= 0)
  +        if 
(valueString.indexOf(org.apache.xpath.compiler.Keywords.FUNC_KEY_STRING
  +                                + "(") >= 0)
             handler.error(
               XSLMessages.createMessage(
               XSLTErrorResources.ER_INVALID_KEY_CALL, null), null);
  
  
  
  1.13      +16 -11    
xml-xalan/java/src/org/apache/xalan/processor/ProcessorLRE.java
  
  Index: ProcessorLRE.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/processor/ProcessorLRE.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- ProcessorLRE.java 2000/11/13 16:26:50     1.12
  +++ ProcessorLRE.java 2000/11/22 23:25:53     1.13
  @@ -75,7 +75,14 @@
   
   /**
    * <meta name="usage" content="internal"/>
  - * NEEDSDOC Class ProcessorLRE <needs-comment/>
  + * Processes an XSLT literal-result-element, or something that looks 
  + * like one.  The actual [EMAIL PROTECTED] 
org.apache.xalan.templates.ElemTemplateElement}
  + * produced may be a [EMAIL PROTECTED] 
org.apache.xalan.templates.ElemLiteralResult}, 
  + * a [EMAIL PROTECTED] org.apache.xalan.templates.StylesheetRoot}, or a 
  + * [EMAIL PROTECTED] org.apache.xalan.templates.ElemExtensionCall}.
  + * 
  + * @see <a 
href="http://www.w3.org/TR/xslt#literal-result-element";>literal-result-element 
in XSLT Specification</a>
  + * @see org.apache.xalan.templates.ElemLiteralResult
    */
   public class ProcessorLRE extends ProcessorTemplateElem
   {
  @@ -83,12 +90,10 @@
     /**
      * Receive notification of the start of an element.
      *
  -   * @param name The element type name.
  -   *
  -   * NEEDSDOC @param handler
  -   * NEEDSDOC @param uri
  -   * NEEDSDOC @param localName
  -   * NEEDSDOC @param rawName
  +   * @param handler non-null reference to current StylesheetHandler that is 
constructing the Templates.
  +   * @param uri The Namespace URI, or an empty string.
  +   * @param localName The local name (without prefix), or empty string if 
not namespace processing.
  +   * @param rawName The qualified name (with prefix).
      * @param attributes The specified or defaulted attributes.
      */
     public void startElement(
  @@ -318,10 +323,10 @@
      * @param name The element type name.
      * @param attributes The specified or defaulted attributes.
      *
  -   * NEEDSDOC @param handler
  -   * NEEDSDOC @param uri
  -   * NEEDSDOC @param localName
  -   * NEEDSDOC @param rawName
  +   * @param handler non-null reference to current StylesheetHandler that is 
constructing the Templates.
  +   * @param uri The Namespace URI, or an empty string.
  +   * @param localName The local name (without prefix), or empty string if 
not namespace processing.
  +   * @param rawName The qualified name (with prefix).
      */
     public void endElement(
             StylesheetHandler handler, String uri, String localName, String 
rawName)
  
  
  
  1.5       +1 -2      
xml-xalan/java/src/org/apache/xalan/processor/ProcessorNamespaceAlias.java
  
  Index: ProcessorNamespaceAlias.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/processor/ProcessorNamespaceAlias.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ProcessorNamespaceAlias.java      2000/11/13 16:26:50     1.4
  +++ ProcessorNamespaceAlias.java      2000/11/22 23:25:53     1.5
  @@ -90,10 +90,9 @@
      *        performed.
      * @param rawName The raw XML 1.0 name (with prefix), or the
      *        empty string if raw names are not available.
  -   * @param atts The attributes attached to the element.  If
  +   * @param attributes The attributes attached to the element.  If
      *        there are no attributes, it shall be an empty
      *        Attributes object.
  -   * NEEDSDOC @param attributes
      */
     public void startElement(
             StylesheetHandler handler, String uri, String localName, String 
rawName, Attributes attributes)
  
  
  
  1.7       +1 -2      
xml-xalan/java/src/org/apache/xalan/processor/ProcessorOutputElem.java
  
  Index: ProcessorOutputElem.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/processor/ProcessorOutputElem.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ProcessorOutputElem.java  2000/11/13 16:26:50     1.6
  +++ ProcessorOutputElem.java  2000/11/22 23:25:53     1.7
  @@ -87,10 +87,9 @@
      *        performed.
      * @param rawName The raw XML 1.0 name (with prefix), or the
      *        empty string if raw names are not available.
  -   * @param atts The attributes attached to the element.  If
  +   * @param attributes The attributes attached to the element.  If
      *        there are no attributes, it shall be an empty
      *        Attributes object.
  -   * NEEDSDOC @param attributes
      */
     public void startElement(
             StylesheetHandler handler, String uri, String localName, String 
rawName, Attributes attributes)
  
  
  
  1.6       +11 -6     
xml-xalan/java/src/org/apache/xalan/processor/ProcessorPreserveSpace.java
  
  Index: ProcessorPreserveSpace.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/processor/ProcessorPreserveSpace.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ProcessorPreserveSpace.java       2000/11/17 20:37:11     1.5
  +++ ProcessorPreserveSpace.java       2000/11/22 23:25:54     1.6
  @@ -81,9 +81,12 @@
     private Vector m_elements;
   
     /**
  -   * Set from the elements attribute.
  +   * Set from the elements attribute.  This is a list of 
  +   * whitespace delimited element qualified names that specify
  +   * preservation of whitespace.
      *
  -   * NEEDSDOC @param elems
  +   * @param elems Should be a non-null reference to a list 
  +   *              of [EMAIL PROTECTED] org.apache.xpath.XPath} objects.
      */
     public void setElements(Vector elems)
     {
  @@ -91,9 +94,12 @@
     }
   
     /**
  -   * Get the property set by setElements().
  +   * Get the property set by setElements().  This is a list of 
  +   * whitespace delimited element qualified names that specify
  +   * preservation of whitespace.
      *
  -   * NEEDSDOC ($objectName$) @return
  +   * @return A reference to a list of [EMAIL PROTECTED] 
org.apache.xpath.XPath} objects, 
  +   *         or null.
      */
     Vector getElements()
     {
  @@ -112,10 +118,9 @@
      *        performed.
      * @param rawName The raw XML 1.0 name (with prefix), or the
      *        empty string if raw names are not available.
  -   * @param atts The attributes attached to the element.  If
  +   * @param attributes The attributes attached to the element.  If
      *        there are no attributes, it shall be an empty
      *        Attributes object.
  -   * NEEDSDOC @param attributes
      */
     public void startElement(
             StylesheetHandler handler, String uri, String localName, String 
rawName, Attributes attributes)
  
  
  
  1.6       +1 -2      
xml-xalan/java/src/org/apache/xalan/processor/ProcessorStripSpace.java
  
  Index: ProcessorStripSpace.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/processor/ProcessorStripSpace.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ProcessorStripSpace.java  2000/11/17 20:37:11     1.5
  +++ ProcessorStripSpace.java  2000/11/22 23:25:54     1.6
  @@ -86,10 +86,9 @@
      *        performed.
      * @param rawName The raw XML 1.0 name (with prefix), or the
      *        empty string if raw names are not available.
  -   * @param atts The attributes attached to the element.  If
  +   * @param attributes The attributes attached to the element.  If
      *        there are no attributes, it shall be an empty
      *        Attributes object.
  -   * NEEDSDOC @param attributes
      */
     public void startElement(
             StylesheetHandler handler, String uri, String localName, String 
rawName, Attributes attributes)
  
  
  
  1.3       +2 -1      
xml-xalan/java/src/org/apache/xalan/processor/ProcessorStylesheetDoc.java
  
  Index: ProcessorStylesheetDoc.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/processor/ProcessorStylesheetDoc.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ProcessorStylesheetDoc.java       2000/10/30 18:40:40     1.2
  +++ ProcessorStylesheetDoc.java       2000/11/22 23:25:55     1.3
  @@ -58,7 +58,8 @@
   
   /**
    * <meta name="usage" content="internal"/>
  - * NEEDSDOC Class ProcessorStylesheetDoc <needs-comment/>
  + * This class processes the xsl:stylesheet element.  At the 
  + * moment, it defers all methods to it's superclass.
    */
   public class ProcessorStylesheetDoc extends XSLTElementProcessor
   {
  
  
  
  1.6       +5 -6      
xml-xalan/java/src/org/apache/xalan/processor/ProcessorStylesheetElement.java
  
  Index: ProcessorStylesheetElement.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/processor/ProcessorStylesheetElement.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ProcessorStylesheetElement.java   2000/11/13 16:26:50     1.5
  +++ ProcessorStylesheetElement.java   2000/11/22 23:25:55     1.6
  @@ -85,10 +85,9 @@
      *        performed.
      * @param rawName The raw XML 1.0 name (with prefix), or the
      *        empty string if raw names are not available.
  -   * @param atts The attributes attached to the element.  If
  +   * @param attributes The attributes attached to the element.  If
      *        there are no attributes, it shall be an empty
      *        Attributes object.
  -   * NEEDSDOC @param attributes
      */
     public void startElement(
             StylesheetHandler handler, String uri, String localName, String 
rawName, Attributes attributes)
  @@ -151,10 +150,10 @@
      * @param name The element type name.
      * @param attributes The specified or defaulted attributes.
      *
  -   * NEEDSDOC @param handler
  -   * NEEDSDOC @param uri
  -   * NEEDSDOC @param localName
  -   * NEEDSDOC @param rawName
  +   * @param handler non-null reference to current StylesheetHandler that is 
constructing the Templates.
  +   * @param uri The Namespace URI, or an empty string.
  +   * @param localName The local name (without prefix), or empty string if 
not namespace processing.
  +   * @param rawName The qualified name (with prefix).
      */
     public void endElement(
             StylesheetHandler handler, String uri, String localName, String 
rawName)
  
  
  
  1.6       +4 -3      
xml-xalan/java/src/org/apache/xalan/processor/ProcessorTemplate.java
  
  Index: ProcessorTemplate.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/processor/ProcessorTemplate.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ProcessorTemplate.java    2000/11/13 16:26:50     1.5
  +++ ProcessorTemplate.java    2000/11/22 23:25:56     1.6
  @@ -73,10 +73,11 @@
      * template element, and then push it onto the current template
      * element stack.
      *
  -   * NEEDSDOC @param handler
  -   * NEEDSDOC @param elem
  +   * @param handler non-null reference to current StylesheetHandler that is 
constructing the Templates.
  +   * @param elem Must be a non-null reference to a [EMAIL PROTECTED] 
org.apache.xalan.templates.ElemTemplate} object.
      *
  -   * @throws TransformerException
  +   * @throws org.xml.sax.SAXException Any SAX exception, possibly
  +   *            wrapping another exception.
      */
     protected void appendAndPush(
             StylesheetHandler handler, ElemTemplateElement elem)
  
  
  
  1.6       +12 -11    
xml-xalan/java/src/org/apache/xalan/processor/ProcessorTemplateElem.java
  
  Index: ProcessorTemplateElem.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/processor/ProcessorTemplateElem.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ProcessorTemplateElem.java        2000/11/13 16:26:50     1.5
  +++ ProcessorTemplateElem.java        2000/11/22 23:25:57     1.6
  @@ -82,10 +82,10 @@
      *
      * @param name The element type name.
      *
  -   * NEEDSDOC @param handler
  -   * NEEDSDOC @param uri
  -   * NEEDSDOC @param localName
  -   * NEEDSDOC @param rawName
  +   * @param handler non-null reference to current StylesheetHandler that is 
constructing the Templates.
  +   * @param uri The Namespace URI, or an empty string.
  +   * @param localName The local name (without prefix), or empty string if 
not namespace processing.
  +   * @param rawName The qualified name (with prefix).
      * @param attributes The specified or defaulted attributes.
      */
     public void startElement(
  @@ -131,10 +131,11 @@
      * template element, and then push it onto the current template
      * element stack.
      *
  -   * NEEDSDOC @param handler
  -   * NEEDSDOC @param elem
  +   * @param handler non-null reference to current StylesheetHandler that is 
constructing the Templates.
  +   * @param elem non-null reference to a the current template element.
      *
  -   * @throws TransformerException
  +   * @throws org.xml.sax.SAXException Any SAX exception, possibly
  +   *            wrapping another exception.
      */
     protected void appendAndPush(
             StylesheetHandler handler, ElemTemplateElement elem)
  @@ -153,10 +154,10 @@
      * @param name The element type name.
      * @param attributes The specified or defaulted attributes.
      *
  -   * NEEDSDOC @param handler
  -   * NEEDSDOC @param uri
  -   * NEEDSDOC @param localName
  -   * NEEDSDOC @param rawName
  +   * @param handler non-null reference to current StylesheetHandler that is 
constructing the Templates.
  +   * @param uri The Namespace URI, or an empty string.
  +   * @param localName The local name (without prefix), or empty string if 
not namespace processing.
  +   * @param rawName The qualified name (with prefix).
      */
     public void endElement(
             StylesheetHandler handler, String uri, String localName, String 
rawName)
  
  
  
  1.5       +8 -7      
xml-xalan/java/src/org/apache/xalan/processor/ProcessorText.java
  
  Index: ProcessorText.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/processor/ProcessorText.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ProcessorText.java        2000/11/13 16:26:50     1.4
  +++ ProcessorText.java        2000/11/22 23:25:57     1.5
  @@ -74,10 +74,11 @@
      * template element, and then push it onto the current template
      * element stack.
      *
  -   * NEEDSDOC @param handler
  -   * NEEDSDOC @param elem
  +   * @param handler non-null reference to current StylesheetHandler that is 
constructing the Templates.
  +   * @param elem non-null reference to a [EMAIL PROTECTED] 
org.apache.xalan.templates.ElemText}.
      *
  -   * @throws TransformerException
  +   * @throws org.xml.sax.SAXException Any SAX exception, possibly
  +   *            wrapping another exception.
      */
     protected void appendAndPush(
             StylesheetHandler handler, ElemTemplateElement elem)
  @@ -102,10 +103,10 @@
      * @param name The element type name.
      * @param attributes The specified or defaulted attributes.
      *
  -   * NEEDSDOC @param handler
  -   * NEEDSDOC @param uri
  -   * NEEDSDOC @param localName
  -   * NEEDSDOC @param rawName
  +   * @param handler non-null reference to current StylesheetHandler that is 
constructing the Templates.
  +   * @param uri The Namespace URI, or an empty string.
  +   * @param localName The local name (without prefix), or empty string if 
not namespace processing.
  +   * @param rawName The qualified name (with prefix).
      */
     public void endElement(
             StylesheetHandler handler, String uri, String localName, String 
rawName)
  
  
  
  1.4       +13 -9     
xml-xalan/java/src/org/apache/xalan/processor/ProcessorUnknown.java
  
  Index: ProcessorUnknown.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/processor/ProcessorUnknown.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ProcessorUnknown.java     2000/11/13 16:26:50     1.3
  +++ ProcessorUnknown.java     2000/11/22 23:25:57     1.4
  @@ -70,7 +70,11 @@
   
   /**
    * <meta name="usage" content="internal"/>
  - * NEEDSDOC Class ProcessorUnknown <needs-comment/>
  + * This class processes an unknown template element, and ignores 
  + * the startElement and endElement events.  It is used both 
  + * for unknown top-level elements, and for elements in the 
  + * xslt namespace when the version is higher than the version 
  + * of XSLT that we are set up to process.
    */
   public class ProcessorUnknown extends ProcessorTemplateElem
   {
  @@ -80,10 +84,10 @@
      *
      * @param name The element type name.
      *
  -   * NEEDSDOC @param handler
  -   * NEEDSDOC @param uri
  -   * NEEDSDOC @param localName
  -   * NEEDSDOC @param rawName
  +   * @param handler non-null reference to current StylesheetHandler that is 
constructing the Templates.
  +   * @param uri The Namespace URI, or an empty string.
  +   * @param localName The local name (without prefix), or empty string if 
not namespace processing.
  +   * @param rawName The qualified name (with prefix).
      * @param attributes The specified or defaulted attributes.
      */
     public void startElement(
  @@ -96,10 +100,10 @@
      * @param name The element type name.
      * @param attributes The specified or defaulted attributes.
      *
  -   * NEEDSDOC @param handler
  -   * NEEDSDOC @param uri
  -   * NEEDSDOC @param localName
  -   * NEEDSDOC @param rawName
  +   * @param handler non-null reference to current StylesheetHandler that is 
constructing the Templates.
  +   * @param uri The Namespace URI, or an empty string.
  +   * @param localName The local name (without prefix), or empty string if 
not namespace processing.
  +   * @param rawName The qualified name (with prefix).
      */
     public void endElement(
             StylesheetHandler handler, String uri, String localName, String 
rawName)
  
  
  
  1.4       +5 -3      
xml-xalan/java/src/org/apache/xalan/processor/StopParseException.java
  
  Index: StopParseException.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/processor/StopParseException.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- StopParseException.java   2000/11/13 16:26:50     1.3
  +++ StopParseException.java   2000/11/22 23:25:58     1.4
  @@ -58,14 +58,16 @@
   
   /**
    * <meta name="usage" content="internal"/>
  - * NEEDSDOC Class StopParseException <needs-comment/>
  + * This is a special exception that is used to stop parsing when 
  + * search for an element.  For instance, when searching for xml:stylesheet 
  + * PIs, it is used to stop the parse once the document element is found.
  + * @see StylesheetPIHandler
    */
   public class StopParseException extends org.xml.sax.SAXException
   {
   
     /**
  -   * Constructor StopParseException
  -   *
  +   * Constructor StopParseException.
      */
     StopParseException()
     {
  
  
  
  1.26      +281 -218  
xml-xalan/java/src/org/apache/xalan/processor/StylesheetHandler.java
  
  Index: StylesheetHandler.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/processor/StylesheetHandler.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- StylesheetHandler.java    2000/11/16 03:22:21     1.25
  +++ StylesheetHandler.java    2000/11/22 23:25:58     1.26
  @@ -57,6 +57,7 @@
   package org.apache.xalan.processor;
   
   import java.net.URL;
  +
   import java.io.IOException;
   
   import javax.xml.transform.sax.TemplatesHandler;
  @@ -67,22 +68,17 @@
   import java.util.Stack;
   
   import org.apache.xalan.res.XSLMessages;
  -
   import org.apache.xalan.templates.Constants;
   import org.apache.xalan.templates.ElemTemplateElement;
   import org.apache.xalan.templates.ElemUnknown;
   import org.apache.xalan.templates.StylesheetRoot;
   import org.apache.xalan.templates.Stylesheet;
  -
   import org.apache.xalan.utils.NodeConsumer;
   import org.apache.xalan.utils.PrefixResolver;
   import org.apache.xalan.utils.XMLCharacterRecognizer;
  -
   import org.apache.xpath.compiler.FunctionTable;
   import org.apache.xpath.compiler.XPathParser;
  -
   import org.apache.xpath.functions.Function;
  -
   import org.apache.xpath.XPathFactory;
   import org.apache.xpath.XPath;
   
  @@ -94,13 +90,13 @@
   import org.xml.sax.EntityResolver;
   import org.xml.sax.InputSource;
   import org.xml.sax.Locator;
  -
   import org.xml.sax.helpers.NamespaceSupport;
   import org.xml.sax.helpers.DefaultHandler;
   
   import javax.xml.transform.SourceLocator;
   import javax.xml.transform.ErrorListener;
   import javax.xml.transform.TransformerException;
  +
   import org.apache.xalan.utils.SAXSourceLocator;
   
   /**
  @@ -118,11 +114,10 @@
      * Create a StylesheetHandler object, creating a root stylesheet
      * as the target.
      *
  -   * NEEDSDOC @param processor
  -   * @exception May throw TransformerConfigurationException if a 
StylesheetRoot
  -   * can not be constructed for some reason.
  +   * @param processor non-null reference to the transformer factory that 
owns this handler.
      *
  -   * @throws TransformerConfigurationException
  +   * @throws TransformerConfigurationException if a StylesheetRoot
  +   * can not be constructed for some reason.
      */
     public StylesheetHandler(TransformerFactoryImpl processor)
             throws TransformerConfigurationException
  @@ -141,12 +136,12 @@
     /**
      * Do common initialization.
      *
  -   * NEEDSDOC @param processor
  +   * @param processor non-null reference to the transformer factory that 
owns this handler.
      */
     void init(TransformerFactoryImpl processor)
     {
   
  -    // Not sure about double-check of this flag, but 
  +    // Not sure about double-check of this flag, but
       // it seems safe...
       if (false == m_xpathFunctionsInited)
       {
  @@ -183,13 +178,15 @@
      * Process an expression string into an XPath.
      * Must be public for access by the AVT class.
      *
  -   * NEEDSDOC @param str
  +   * @param str A non-null reference to a valid or invalid XPath expression 
string.
      *
  -   * NEEDSDOC ($objectName$) @return
  +   * @return A non-null reference to an XPath object that represents the 
string argument.
      *
  -   * @throws javax.xml.transform.TransformerException
  +   * @throws javax.xml.transform.TransformerException if the expression can 
not be processed.
  +   * @see <a href="http://www.w3.org/TR/xslt#section-Expressions";>Section 4 
Expressions in XSLT Specification</a>
      */
  -  public XPath createXPath(String str) throws 
javax.xml.transform.TransformerException
  +  public XPath createXPath(String str)
  +          throws javax.xml.transform.TransformerException
     {
       return new XPath(str, getLocator(), this, XPath.SELECT);
     }
  @@ -197,25 +194,27 @@
     /**
      * Process an expression string into an XPath.
      *
  -   * NEEDSDOC @param str
  +   * @param str A non-null reference to a valid or invalid match pattern 
string.
      *
  -   * NEEDSDOC ($objectName$) @return
  +   * @return A non-null reference to an XPath object that represents the 
string argument.
      *
  -   * @throws javax.xml.transform.TransformerException
  +   * @throws javax.xml.transform.TransformerException if the pattern can not 
be processed.
  +   * @see <a href="http://www.w3.org/TR/xslt#patterns";>Section 5.2 Patterns 
in XSLT Specification</a>
      */
  -  XPath createMatchPatternXPath(String str) throws 
javax.xml.transform.TransformerException
  +  XPath createMatchPatternXPath(String str)
  +          throws javax.xml.transform.TransformerException
     {
       return new XPath(str, getLocator(), this, XPath.MATCH);
     }
   
     /**
  -   * Given a namespace, get the corrisponding prefix.  This assumes that
  -   * the PrevixResolver hold's it's own namespace context, or is a namespace
  -   * context itself.
  +   * Given a namespace, get the corrisponding prefix from the current
  +   * namespace support context.
      *
  -   * NEEDSDOC @param prefix
  +   * @param prefix The prefix to look up, which may be an empty string ("") 
for the default Namespace.
      *
  -   * NEEDSDOC ($objectName$) @return
  +   * @return The associated Namespace URI, or null if the prefix
  +   *         is undeclared in this context.
      */
     public String getNamespaceForPrefix(String prefix)
     {
  @@ -223,17 +222,20 @@
     }
   
     /**
  -   * Given a namespace, get the corrisponding prefix.
  +   * Given a namespace, get the corrisponding prefix.  This is here only
  +   * to support the [EMAIL PROTECTED] org.apache.xalan.utils.PrefixResolver} 
interface,
  +   * and will throw an error if invoked on this object.
      *
  -   * NEEDSDOC @param prefix
  -   * NEEDSDOC @param context
  +   * @param prefix The prefix to look up, which may be an empty string ("") 
for the default Namespace.
  +   * @param context The node context from which to look up the URI.
      *
  -   * NEEDSDOC ($objectName$) @return
  +   * @return The associated Namespace URI, or null if the prefix
  +   *         is undeclared in this context.
      */
     public String getNamespaceForPrefix(String prefix, org.w3c.dom.Node 
context)
     {
   
  -    // Don't need to support this here.  Return the current URI for the 
prefix, 
  +    // Don't need to support this here.  Return the current URI for the 
prefix,
       // ignoring the context.
       assert(true, "can't process a context node in StylesheetHandler!");
   
  @@ -241,12 +243,12 @@
     }
   
     /**
  -   * Test to see if the stack contains the given URL.
  +   * Utility function to see if the stack contains the given URL.
      *
  -   * NEEDSDOC @param stack
  -   * NEEDSDOC @param url
  +   * @param stack non-null reference to a Stack.
  +   * @param url URL string on which an equality test will be performed.
      *
  -   * NEEDSDOC ($objectName$) @return
  +   * @return true if the stack contains the url argument.
      */
     private boolean stackContains(Stack stack, String url)
     {
  @@ -283,8 +285,6 @@
      *
      * @version Alpha
      * @author <a href="mailto:[EMAIL PROTECTED]">Scott Boag</a>
  -   *
  -   * @throws TransformerException
      */
     public Templates getTemplates()
     {
  @@ -295,16 +295,18 @@
      * Set the base ID (URL or system ID) for the stylesheet
      * created by this builder.  This must be set in order to
      * resolve relative URLs in the stylesheet.
  +   *
      * @param baseID Base URL for this stylesheet.
      */
     public void setSystemId(String baseID)
     {
       pushBaseIndentifier(baseID);
     }
  -  
  +
     /**
  -   * Get the base ID (URI or system ID) from where relative 
  +   * Get the base ID (URI or system ID) from where relative
      * URLs will be resolved.
  +   *
      * @return The systemID that was set with [EMAIL PROTECTED] #setSystemId}.
      */
     public String getSystemId()
  @@ -312,7 +314,6 @@
       return this.getBaseIdentifier();
     }
   
  -
     ////////////////////////////////////////////////////////////////////
     // Implementation of the EntityResolver interface.
     ////////////////////////////////////////////////////////////////////
  @@ -327,10 +328,10 @@
      * @return The new input source, or null to require the
      *         default behaviour.
      *
  -   * @throws TransformerException
  +   * @throws org.xml.sax.SAXException if the entity can not be resolved.
      */
     public InputSource resolveEntity(String publicId, String systemId)
  -    throws org.xml.sax.SAXException
  +          throws org.xml.sax.SAXException
     {
       return getCurrentProcessor().resolveEntity(this, publicId, systemId);
     }
  @@ -378,17 +379,18 @@
      * Given a namespace URI, and a local name or a node type, get the 
processor
      * for the element, or return null if not allowed.
      *
  -   * NEEDSDOC @param uri
  -   * NEEDSDOC @param localName
  -   * NEEDSDOC @param rawName
  +   * @param uri The Namespace URI, or an empty string.
  +   * @param localName The local name (without prefix), or empty string if 
not namespace processing.
  +   * @param rawName The qualified name (with prefix).
      *
  -   * NEEDSDOC ($objectName$) @return
  +   * @return A non-null reference to a element processor.
      *
  -   * @throws TransformerException
  +   * @throws org.xml.sax.SAXException if the element is not allowed in the
  +   * found position in the stylesheet.
      */
     XSLTElementProcessor getProcessorFor(
  -          String uri, String localName, String rawName) 
  -    throws org.xml.sax.SAXException
  +          String uri, String localName, String rawName)
  +            throws org.xml.sax.SAXException
     {
   
       XSLTElementProcessor currentProcessor = getCurrentProcessor();
  @@ -396,9 +398,9 @@
       XSLTElementProcessor elemProcessor = def.getProcessorFor(uri, localName);
   
       if (null == elemProcessor
  -        && ( null==getStylesheet() 
  -          || Double.valueOf(getStylesheet().getVersion()).doubleValue()
  -          > Constants.XSLTVERSUPPORTED) )
  +            && (null == getStylesheet()
  +                || Double.valueOf(getStylesheet().getVersion()).doubleValue()
  +                   > Constants.XSLTVERSUPPORTED))
       {
         elemProcessor = def.getProcessorForUnknown(uri, localName);
       }
  @@ -440,11 +442,10 @@
     /**
      * Receive notification of the beginning of the document.
      *
  -   * @exception javax.xml.transform.TransformerException Any SAX exception, 
possibly
  -   *            wrapping another exception.
      * @see org.xml.sax.ContentHandler#startDocument
      *
  -   * @throws TransformerException
  +   * @throws org.xml.sax.SAXException Any SAX exception, possibly
  +   *            wrapping another exception.
      */
     public void startDocument() throws org.xml.sax.SAXException
     {
  @@ -452,33 +453,35 @@
     }
   
     // support for isParsingComplete
  -  private boolean m_parsingComplete=false; 
  +
  +  /** NEEDSDOC Field m_parsingComplete */
  +  private boolean m_parsingComplete = false;
   
  -  
  -  /** Test whether the _last_ endDocument() has been processed.
  +  /**
  +   * Test whether the _last_ endDocument() has been processed.
      * This is needed as guidance for stylesheet optimization
      * and compilation engines, which generally don't want to start
      * until all included and imported stylesheets have been fully
      * parsed.
  -   * 
  +   *
      * @return true iff the complete stylesheet tree has been built.
      */
     public boolean isStylesheetParsingComplete()
     {
  -       return m_parsingComplete;
  +    return m_parsingComplete;
     }
   
     /**
      * Receive notification of the end of the document.
      *
  -   * @exception javax.xml.transform.TransformerException Any SAX exception, 
possibly
  -   *            wrapping another exception.
      * @see org.xml.sax.ContentHandler#endDocument
      *
  -   * @throws TransformerException
  +   * @throws org.xml.sax.SAXException Any SAX exception, possibly
  +   *            wrapping another exception.
      */
     public void endDocument() throws org.xml.sax.SAXException
     {
  +
       try
       {
         if (null != getStylesheetRoot())
  @@ -487,7 +490,7 @@
             getStylesheetRoot().recompose();
   
           // Resolve the result prefix tables in the elements.
  -        if(null != getLastPoppedStylesheet())
  +        if (null != getLastPoppedStylesheet())
             getLastPoppedStylesheet().resolvePrefixTables();
         }
         else
  @@ -499,19 +502,18 @@
           elemProcessor.startNonText(this);
   
         m_stylesheetLevel--;
  -      
  +
         // WARNING: This test works only as long as stylesheets are parsed
         // more or less recursively. If we switch to an iterative "work-list"
  -      // model, this will become true prematurely. In that case, 
  +      // model, this will become true prematurely. In that case,
         // isStylesheetParsingComplete() will have to be adjusted to be aware
         // of the worklist.
  -      m_parsingComplete=(m_stylesheetLevel<0);
  +      m_parsingComplete = (m_stylesheetLevel < 0);
       }
  -    catch(TransformerException te)
  +    catch (TransformerException te)
       {
         throw new org.xml.sax.SAXException(te);
       }
  -
     }
   
     /**
  @@ -524,11 +526,10 @@
      *
      * @param prefix The Namespace prefix being declared.
      * @param uri The Namespace URI mapped to the prefix.
  -   * @exception javax.xml.transform.TransformerException Any SAX exception, 
possibly
  -   *            wrapping another exception.
      * @see org.xml.sax.ContentHandler#startPrefixMapping
      *
  -   * @throws TransformerException
  +   * @throws org.xml.sax.SAXException Any SAX exception, possibly
  +   *            wrapping another exception.
      */
     public void startPrefixMapping(String prefix, String uri)
             throws org.xml.sax.SAXException
  @@ -547,11 +548,10 @@
      * output to a file).</p>
      *
      * @param prefix The Namespace prefix being declared.
  -   * @exception javax.xml.transform.TransformerException Any SAX exception, 
possibly
  -   *            wrapping another exception.
      * @see org.xml.sax.ContentHandler#endPrefixMapping
      *
  -   * @throws TransformerException
  +   * @throws org.xml.sax.SAXException Any SAX exception, possibly
  +   *            wrapping another exception.
      */
     public void endPrefixMapping(String prefix) throws org.xml.sax.SAXException
     {
  @@ -562,7 +562,7 @@
     /**
      * Flush the characters buffer.
      *
  -   * @throws TransformerException
  +   * @throws org.xml.sax.SAXException
      */
     private void flushCharacters() throws org.xml.sax.SAXException
     {
  @@ -578,10 +578,12 @@
      *
      * @param name The element type name.
      *
  -   * NEEDSDOC @param uri
  -   * NEEDSDOC @param localName
  -   * NEEDSDOC @param rawName
  +   * @param uri The Namespace URI, or an empty string.
  +   * @param localName The local name (without prefix), or empty string if 
not namespace processing.
  +   * @param rawName The qualified name (with prefix).
      * @param attributes The specified or defaulted attributes.
  +   *
  +   * @throws org.xml.sax.SAXException
      */
     public void startElement(
             String uri, String localName, String rawName, Attributes 
attributes)
  @@ -598,12 +600,11 @@
       flushCharacters();
   
       XSLTElementProcessor elemProcessor = getProcessorFor(uri, localName,
  -                                                         rawName);
  +                                           rawName);
   
       this.pushProcessor(elemProcessor);
       elemProcessor.startElement(this, uri, localName, rawName, attributes);
       this.getNamespaceSupport().pushContext();
  -
     }
   
     /**
  @@ -612,14 +613,13 @@
      * @param name The element type name.
      * @param attributes The specified or defaulted attributes.
      *
  -   * NEEDSDOC @param uri
  -   * NEEDSDOC @param localName
  -   * NEEDSDOC @param rawName
  -   * @exception javax.xml.transform.TransformerException Any SAX exception, 
possibly
  -   *            wrapping another exception.
  +   * @param uri The Namespace URI, or an empty string.
  +   * @param localName The local name (without prefix), or empty string if 
not namespace processing.
  +   * @param rawName The qualified name (with prefix).
      * @see org.xml.sax.ContentHandler#endElement
      *
  -   * @throws TransformerException
  +   * @throws org.xml.sax.SAXException Any SAX exception, possibly
  +   *            wrapping another exception.
      */
     public void endElement(String uri, String localName, String rawName)
             throws org.xml.sax.SAXException
  @@ -649,14 +649,13 @@
      * @param start The start position in the character array.
      * @param length The number of characters to use from the
      *               character array.
  -   * @exception javax.xml.transform.TransformerException Any SAX exception, 
possibly
  -   *            wrapping another exception.
      * @see org.xml.sax.ContentHandler#characters
      *
  -   * @throws TransformerException
  +   * @throws org.xml.sax.SAXException Any SAX exception, possibly
  +   *            wrapping another exception.
      */
  -  public void characters(char ch[], int start, int length) 
  -    throws org.xml.sax.SAXException
  +  public void characters(char ch[], int start, int length)
  +          throws org.xml.sax.SAXException
     {
   
       if (!m_shouldProcess)
  @@ -688,11 +687,10 @@
      * @param start The start position in the character array.
      * @param length The number of characters to use from the
      *               character array.
  -   * @exception javax.xml.transform.TransformerException Any SAX exception, 
possibly
  -   *            wrapping another exception.
      * @see org.xml.sax.ContentHandler#ignorableWhitespace
      *
  -   * @throws TransformerException
  +   * @throws org.xml.sax.SAXException Any SAX exception, possibly
  +   *            wrapping another exception.
      */
     public void ignorableWhitespace(char ch[], int start, int length)
             throws org.xml.sax.SAXException
  @@ -715,11 +713,10 @@
      * @param target The processing instruction target.
      * @param data The processing instruction data, or null if
      *             none is supplied.
  -   * @exception javax.xml.transform.TransformerException Any SAX exception, 
possibly
  -   *            wrapping another exception.
      * @see org.xml.sax.ContentHandler#processingInstruction
      *
  -   * @throws TransformerException
  +   * @throws org.xml.sax.SAXException Any SAX exception, possibly
  +   *            wrapping another exception.
      */
     public void processingInstruction(String target, String data)
             throws org.xml.sax.SAXException
  @@ -741,11 +738,10 @@
      * invoking other methods.</p>
      *
      * @param name The name of the skipped entity.
  -   * @exception javax.xml.transform.TransformerException Any SAX exception, 
possibly
  -   *            wrapping another exception.
      * @see org.xml.sax.ContentHandler#processingInstruction
      *
  -   * @throws TransformerException
  +   * @throws org.xml.sax.SAXException Any SAX exception, possibly
  +   *            wrapping another exception.
      */
     public void skippedEntity(String name) throws org.xml.sax.SAXException
     {
  @@ -760,12 +756,14 @@
      * <meta name="usage" content="internal"/>
      * Warn the user of an problem.
      *
  -   * NEEDSDOC @param msg
  -   * NEEDSDOC @param args
  -   * @exception XSLProcessorException thrown if the active ProblemListener 
and XPathContext decide
  -   * the error condition is severe enough to halt processing.
  -   *
  -   * @throws TransformerException
  +   * @param msg An index into the [EMAIL PROTECTED] 
org.apache.xalan.res.XSLTErrorResources}
  +   * table, that is one of the WG_ prefixed definitions.
  +   * @param args An array of arguments for the given warning.
  +   *
  +   * @throws org.xml.sax.SAXException that wraps a
  +   * [EMAIL PROTECTED] javax.xml.transform.TransformerException} if the 
current
  +   * [EMAIL PROTECTED] javax.xml.transform.ErrorListener#warning}
  +   * method chooses to flag this condition as an error.
      */
     public void warn(int msg, Object args[]) throws org.xml.sax.SAXException
     {
  @@ -779,7 +777,7 @@
         if (null != handler)
           handler.warning(new TransformerException(formattedMsg, locator));
       }
  -    catch(TransformerException te)
  +    catch (TransformerException te)
       {
         throw new org.xml.sax.SAXException(te);
       }
  @@ -789,11 +787,12 @@
      * <meta name="usage" content="internal"/>
      * Assert that a condition is true.  If it is not true, throw an error.
      *
  -   * NEEDSDOC @param condition
  -   * NEEDSDOC @param msg
  -   * @exception throws Runtime Exception.
  +   * @param condition false if an error should not be thrown, otherwise true.
  +   * @param msg Error message to be passed to the RuntimeException as an
  +   * argument.
  +   * @throws RuntimeException if the condition is not true.
      */
  -  private void assert(boolean condition, String msg)
  +  private void assert(boolean condition, String msg) throws RuntimeException
     {
       if (!condition)
         throw new RuntimeException(msg);
  @@ -804,35 +803,38 @@
      * Tell the user of an error, and probably throw an
      * exception.
      *
  -   * NEEDSDOC @param msg
  -   * NEEDSDOC @param e
  -   * @exception XSLProcessorException thrown if the active ProblemListener 
and XPathContext decide
  -   * the error condition is severe enough to halt processing.
  +   * @param msg An error message.
  +   * @param e An error which the SAXException should wrap.
      *
  -   * @throws TransformerException
  +   * @throws org.xml.sax.SAXException that wraps a
  +   * [EMAIL PROTECTED] javax.xml.transform.TransformerException} if the 
current
  +   * [EMAIL PROTECTED] javax.xml.transform.ErrorListener#error}
  +   * method chooses to flag this condition as an error.
      */
  -  protected void error(String msg, Exception e) throws 
org.xml.sax.SAXException
  +  protected void error(String msg, Exception e)
  +          throws org.xml.sax.SAXException
     {
   
       SAXSourceLocator locator = getLocator();
       ErrorListener handler = m_stylesheetProcessor.getErrorListener();
       TransformerException pe;
  -    if(!(e instanceof TransformerException))
  +
  +    if (!(e instanceof TransformerException))
       {
         pe = (null == e)
              ? new TransformerException(msg, locator)
  -             : new TransformerException(msg, locator, e);
  +           : new TransformerException(msg, locator, e);
       }
       else
  -      pe = (TransformerException)e;
  +      pe = (TransformerException) e;
   
       if (null != handler)
       {
         try
         {
  -        handler.fatalError(pe);
  +        handler.error(pe);
         }
  -      catch(TransformerException te)
  +      catch (TransformerException te)
         {
           throw new org.xml.sax.SAXException(te);
         }
  @@ -845,14 +847,16 @@
      * <meta name="usage" content="internal"/>
      * Tell the user of an error, and probably throw an
      * exception.
  -   *
  -   * NEEDSDOC @param msg
  -   * NEEDSDOC @param args
  -   * NEEDSDOC @param e
  -   * @exception XSLProcessorException thrown if the active ProblemListener 
and XPathContext decide
  -   * the error condition is severe enough to halt processing.
      *
  -   * @throws TransformerException
  +   * @param msg An index into the [EMAIL PROTECTED] 
org.apache.xalan.res.XSLTErrorResources}
  +   * table, that is one of the WG_ prefixed definitions.
  +   * @param args An array of arguments for the given warning.
  +   * @param e An error which the SAXException should wrap.
  +   *
  +   * @throws org.xml.sax.SAXException that wraps a
  +   * [EMAIL PROTECTED] javax.xml.transform.TransformerException} if the 
current
  +   * [EMAIL PROTECTED] javax.xml.transform.ErrorListener#error}
  +   * method chooses to flag this condition as an error.
      */
     protected void error(int msg, Object args[], Exception e)
             throws org.xml.sax.SAXException
  @@ -864,65 +868,87 @@
     }
   
     /**
  -   * Receive notification of a parser warning.
  +   * Receive notification of a XSLT processing warning.
      *
      * @param e The warning information encoded as an exception.
  -   * @exception javax.xml.transform.TransformerException Any SAX exception, 
possibly
  -   *            wrapping another exception.
      *
  -   * @throws TransformerException
  +   * @throws org.xml.sax.SAXException that wraps a
  +   * [EMAIL PROTECTED] javax.xml.transform.TransformerException} if the 
current
  +   * [EMAIL PROTECTED] javax.xml.transform.ErrorListener#warning}
  +   * method chooses to flag this condition as an error.
      */
  -  public void warning(org.xml.sax.SAXParseException e) 
  -    throws org.xml.sax.SAXException
  +  public void warning(org.xml.sax.SAXParseException e)
  +          throws org.xml.sax.SAXException
     {
  +
  +    String formattedMsg = e.getMessage();
  +    SAXSourceLocator locator = getLocator();
  +    ErrorListener handler = m_stylesheetProcessor.getErrorListener();
   
  -    // Need to set up a diagnosticsWriter here?
  -    System.out.println("WARNING: " + e.getMessage());
  -    System.out.println(" ID: " + e.getSystemId() + " Line #"
  -                       + e.getLineNumber() + " Column #"
  -                       + e.getColumnNumber());
  +    try
  +    {
  +      handler.warning(new TransformerException(formattedMsg, locator));
  +    }
  +    catch (TransformerException te)
  +    {
  +      throw new org.xml.sax.SAXException(te);
  +    }
     }
   
     /**
  -   * Receive notification of a recoverable parser error.
  +   * Receive notification of a recoverable XSLT processing error.
      *
  -   * @param e The warning information encoded as an exception.
  -   * @exception javax.xml.transform.TransformerException Any SAX exception, 
possibly
  -   *            wrapping another exception.
  +   * @param e The error information encoded as an exception.
      *
  -   * @throws TransformerException
  +   * @throws org.xml.sax.SAXException that wraps a
  +   * [EMAIL PROTECTED] javax.xml.transform.TransformerException} if the 
current
  +   * [EMAIL PROTECTED] javax.xml.transform.ErrorListener#error}
  +   * method chooses to flag this condition as an error.
      */
  -  public void error(org.xml.sax.SAXParseException e) 
  -    throws org.xml.sax.SAXException
  +  public void error(org.xml.sax.SAXParseException e)
  +          throws org.xml.sax.SAXException
     {
  +
  +    String formattedMsg = e.getMessage();
  +    SAXSourceLocator locator = getLocator();
  +    ErrorListener handler = m_stylesheetProcessor.getErrorListener();
   
  -    // Need to set up a diagnosticsWriter here?
  -    System.out.println("RECOVERABLE ERROR: " + e.getMessage());
  -    System.out.println(" ID: " + e.getSystemId() + " Line #"
  -                       + e.getLineNumber() + " Column #"
  -                       + e.getColumnNumber());
  +    try
  +    {
  +      handler.error(new TransformerException(formattedMsg, locator));
  +    }
  +    catch (TransformerException te)
  +    {
  +      throw new org.xml.sax.SAXException(te);
  +    }
     }
   
     /**
  -   * Report a fatal XML parsing error.
  -   *
  -   * <p>The default implementation throws a TransformerException.
  -   * Application writers may override this method in a subclass if
  -   * they need to take specific actions for each fatal error (such as
  -   * collecting all of the errors into a single report): in any case,
  -   * the application must stop all regular processing when this
  -   * method is invoked, since the document is no longer reliable, and
  -   * the parser may no longer report parsing events.</p>
  +   * Report a fatal XSLT processing error.
      *
      * @param e The error information encoded as an exception.
  -   * @exception javax.xml.transform.TransformerException Any SAX exception, 
possibly
  -   *            wrapping another exception.
      *
  -   * @throws TransformerException
  +   * @throws org.xml.sax.SAXException that wraps a
  +   * [EMAIL PROTECTED] javax.xml.transform.TransformerException} if the 
current
  +   * [EMAIL PROTECTED] javax.xml.transform.ErrorListener#fatalError}
  +   * method chooses to flag this condition as an error.
      */
  -  public void fatalError(org.xml.sax.SAXParseException e) throws 
org.xml.sax.SAXException
  +  public void fatalError(org.xml.sax.SAXParseException e)
  +          throws org.xml.sax.SAXException
     {
  -    throw e;
  +
  +    String formattedMsg = e.getMessage();
  +    SAXSourceLocator locator = getLocator();
  +    ErrorListener handler = m_stylesheetProcessor.getErrorListener();
  +
  +    try
  +    {
  +      handler.fatalError(new TransformerException(formattedMsg, locator));
  +    }
  +    catch (TransformerException te)
  +    {
  +      throw new org.xml.sax.SAXException(te);
  +    }
     }
   
     /**
  @@ -959,7 +985,7 @@
      * Check to see if an ID attribute matched the #id, called
      * from startElement.
      *
  -   * NEEDSDOC @param attributes
  +   * @param attributes The specified or defaulted attributes.
      */
     private void checkForFragmentID(Attributes attributes)
     {
  @@ -995,32 +1021,42 @@
     private TransformerFactoryImpl m_stylesheetProcessor;
   
     /**
  -   * Get the XSLT TransformerFactory for needed services.
  +   * Get the XSLT TransformerFactoryImpl for needed services.
  +   * TODO: This method should be renamed.
      *
  -   * NEEDSDOC ($objectName$) @return
  +   * @return The TransformerFactoryImpl that owns this handler.
      */
     TransformerFactoryImpl getStylesheetProcessor()
     {
       return m_stylesheetProcessor;
     }
   
  -  /** NEEDSDOC Field STYPE_ROOT          */
  +  /**
  +   * If [EMAIL PROTECTED] #getStylesheetType} returns this value, the 
current stylesheet
  +   *  is a root stylesheet.
  +   */
     static final int STYPE_ROOT = 1;
   
  -  /** NEEDSDOC Field STYPE_INCLUDE          */
  +  /**
  +   * If [EMAIL PROTECTED] #getStylesheetType} returns this value, the 
current stylesheet
  +   *  is an included stylesheet.
  +   */
     static final int STYPE_INCLUDE = 2;
   
  -  /** NEEDSDOC Field STYPE_IMPORT          */
  +  /**
  +   * If [EMAIL PROTECTED] #getStylesheetType} returns this value, the 
current stylesheet
  +   *  is an imported stylesheet.
  +   */
     static final int STYPE_IMPORT = 3;
   
  -  /** NEEDSDOC Field m_stylesheetType          */
  +  /** The current stylesheet type. */
     private int m_stylesheetType = STYPE_ROOT;
   
     /**
      * Get the type of stylesheet that should be built
      * or is being processed.
      *
  -   * NEEDSDOC ($objectName$) @return
  +   * @return one of STYPE_ROOT, STYPE_INCLUDE, or STYPE_IMPORT.
      */
     int getStylesheetType()
     {
  @@ -1031,7 +1067,7 @@
      * Set the type of stylesheet that should be built
      * or is being processed.
      *
  -   * NEEDSDOC @param type
  +   * @param type Must be one of STYPE_ROOT, STYPE_INCLUDE, or STYPE_IMPORT.
      */
     void setStylesheetType(int type)
     {
  @@ -1046,7 +1082,8 @@
     /**
      * Return the stylesheet that this handler is constructing.
      *
  -   * NEEDSDOC ($objectName$) @return
  +   * @return The current stylesheet that is on top of the stylesheets stack,
  +   *  or null if no stylesheet is on the stylesheets stack.
      */
     Stylesheet getStylesheet()
     {
  @@ -1055,9 +1092,9 @@
     }
   
     /**
  -   * Return the stylesheet that this handler is constructing.
  +   * Return the last stylesheet that was popped off the stylesheets stack.
      *
  -   * NEEDSDOC ($objectName$) @return
  +   * @return The last popped stylesheet, or null.
      */
     Stylesheet getLastPoppedStylesheet()
     {
  @@ -1065,25 +1102,27 @@
     }
   
     /**
  -   * Return the stylesheet that this handler is constructing.
  +   * Return the stylesheet root that this handler is constructing.
      *
  -   * NEEDSDOC ($objectName$) @return
  +   * @return The root stylesheet of the stylesheets tree.
      */
     public StylesheetRoot getStylesheetRoot()
     {
       return m_stylesheetRoot;
     }
   
  -  /** NEEDSDOC Field m_stylesheetRoot          */
  +  /** The root stylesheet of the stylesheets tree. */
     StylesheetRoot m_stylesheetRoot;
   
  -  /** NEEDSDOC Field m_lastPoppedStylesheet          */
  +  /** The last stylesheet that was popped off the stylesheets stack. */
     Stylesheet m_lastPoppedStylesheet;
   
     /**
  -   * Return the stylesheet that this handler is constructing.
  +   * Push the current stylesheet being constructed. If no other stylesheets
  +   * have been pushed onto the stack, assume the argument is a stylesheet
  +   * root, and also set the stylesheet root member.
      *
  -   * NEEDSDOC @param s
  +   * @param s non-null reference to a stylesheet.
      */
     void pushStylesheet(Stylesheet s)
     {
  @@ -1095,9 +1134,11 @@
     }
   
     /**
  -   * Return the stylesheet that this handler is constructing.
  +   * Pop the last stylesheet pushed, and return the stylesheet that this
  +   * handler is constructing, and set the last popped stylesheet member.
  +   * Also pop the stylesheet locator stack.
      *
  -   * NEEDSDOC ($objectName$) @return
  +   * @return The stylesheet popped off the stack, or the last popped 
stylesheet.
      */
     Stylesheet popStylesheet()
     {
  @@ -1105,12 +1146,13 @@
       // The stylesheetLocatorStack needs to be popped because
       // a locator was pushed in for this stylesheet by the SAXparser by 
calling
       // setDocumentLocator().
  -    if(!m_stylesheetLocatorStack.isEmpty())
  +    if (!m_stylesheetLocatorStack.isEmpty())
         m_stylesheetLocatorStack.pop();
   
  -    if(!m_stylesheets.isEmpty())
  +    if (!m_stylesheets.isEmpty())
         m_lastPoppedStylesheet = (Stylesheet) m_stylesheets.pop();
   
  +    // Shouldn't this be null if stylesheets is empty?  -sb
       return m_lastPoppedStylesheet;
     }
   
  @@ -1121,6 +1163,7 @@
   
     /**
      * Get the current XSLTElementProcessor at the top of the stack.
  +   *
      * @return Valid XSLTElementProcessor, which should never be null.
      */
     XSLTElementProcessor getCurrentProcessor()
  @@ -1131,7 +1174,7 @@
     /**
      * Push the current XSLTElementProcessor onto the top of the stack.
      *
  -   * NEEDSDOC @param processor
  +   * @param processor non-null reference to the current element processor.
      */
     void pushProcessor(XSLTElementProcessor processor)
     {
  @@ -1159,7 +1202,7 @@
      * Get the root of the XSLT Schema, which tells us how to
      * transition content handlers, create elements, etc.
      *
  -   * NEEDSDOC ($objectName$) @return
  +   * @return The root XSLT Schema, which should never be null.
      */
     XSLTSchema getSchema()
     {
  @@ -1187,18 +1230,24 @@
         return null;
       }
     }
  -  
  +
  +  /** NEEDSDOC Field m_docOrderCount */
     private int m_docOrderCount = 0;
   
     /**
  -   * Push the current XSLTElementProcessor to the top of the stack.
  +   * Push the current XSLTElementProcessor to the top of the stack.  As a
  +   * side-effect, set the document order index (simply because this is a
  +   * convenient place to set it).
      *
  -   * NEEDSDOC @param elem
  +   * @param elem Should be a non-null reference to the intended current
  +   * template element.
      */
     void pushElemTemplateElement(ElemTemplateElement elem)
     {
  -    if(elem.getUid() == -1)
  +
  +    if (elem.getUid() == -1)
         elem.setUid(m_docOrderCount++);
  +
       m_elems.push(elem);
     }
   
  @@ -1226,7 +1275,7 @@
     /**
      * Get an XSLMessages instance capable of producing user messages.
      *
  -   * NEEDSDOC ($objectName$) @return
  +   * @return non-null reference to the error and warnings table.
      */
     XSLMessages getXSLMessages()
     {
  @@ -1242,7 +1291,10 @@
     /**
      * Push a base identifier onto the base URI stack.
      *
  -   * NEEDSDOC @param baseID
  +   * @param baseID The current base identifier for this position in the
  +   * stylesheet, which may be a fragment identifier, or which may be null.
  +   * @see <a href="http://www.w3.org/TR/xslt#base-uri";>
  +   * Section 3.2 Base URI of XSLT specification.</a>
      */
     void pushBaseIndentifier(String baseID)
     {
  @@ -1273,7 +1325,7 @@
     {
       return (String) m_baseIdentifiers.pop();
     }
  -  
  +
     /**
      * Return the base identifier.
      *
  @@ -1281,22 +1333,24 @@
      */
     public String getBaseIdentifier()
     {
  -    // Try to get the baseIdentifier from the baseIdentifier's stack, 
  -    // which may not be the same thing as the value found in the 
  +
  +    // Try to get the baseIdentifier from the baseIdentifier's stack,
  +    // which may not be the same thing as the value found in the
       // SourceLocators stack.
  -    String base = (String)(m_baseIdentifiers.isEmpty() ? null : 
m_baseIdentifiers.peek());
  +    String base = (String) (m_baseIdentifiers.isEmpty()
  +                            ? null : m_baseIdentifiers.peek());
   
       // Otherwise try the stylesheet.
  -    if(null == base)
  +    if (null == base)
       {
         SourceLocator locator = getLocator();
   
         base = (null == locator) ? "" : locator.getSystemId();
       }
  +
       return base;
     }
   
  -
     /**
      * The top of this stack should contain the currently processed
      * stylesheet SAX locator object.
  @@ -1306,7 +1360,7 @@
     /**
      * Get the current stylesheet Locator object.
      *
  -   * NEEDSDOC ($objectName$) @return
  +   * @return non-null reference to the current locator object.
      */
     public SAXSourceLocator getLocator()
     {
  @@ -1314,9 +1368,11 @@
       if (m_stylesheetLocatorStack.isEmpty())
       {
         SAXSourceLocator locator = new SAXSourceLocator();
  -      
  +
         locator.setSystemId(this.getStylesheetProcessor().getDOMsystemID());
  +
         return locator;
  +
         // m_stylesheetLocatorStack.push(locator);
       }
   
  @@ -1332,7 +1388,8 @@
     /**
      * Push an import href onto the stylesheet stack.
      *
  -   * NEEDSDOC @param hrefUrl
  +   * @param hrefUrl non-null reference to the URL for the current imported
  +   * stylesheet.
      */
     void pushImportURL(String hrefUrl)
     {
  @@ -1341,11 +1398,11 @@
   
     /**
      * See if the imported stylesheet stack already contains
  -   * the given URL.
  +   * the given URL.  Used to test for recursive imports.
      *
  -   * NEEDSDOC @param hrefUrl
  +   * @param hrefUrl non-null reference to a URL string.
      *
  -   * NEEDSDOC ($objectName$) @return
  +   * @return true if the URL is on the import stack.
      */
     boolean importStackContains(String hrefUrl)
     {
  @@ -1355,7 +1412,7 @@
     /**
      * Pop an import href from the stylesheet stack.
      *
  -   * NEEDSDOC ($objectName$) @return
  +   * @return non-null reference to the import URL that was popped.
      */
     String popImportURL()
     {
  @@ -1373,12 +1430,11 @@
      */
     private XPathParser m_xpathProcessor = new XPathParser();
   
  -  /** NEEDSDOC Field m_nsSupportStack          */
  +  /** Stack of [EMAIL PROTECTED] org.xml.sax.helpers.NamespaceSupport} 
objects. */
     Stack m_nsSupportStack = new Stack();
   
     /**
  -   * NEEDSDOC Method pushNewNamespaceSupport 
  -   *
  +   * Push a new [EMAIL PROTECTED] org.xml.sax.helpers.NamespaceSupport} 
instance.
      */
     void pushNewNamespaceSupport()
     {
  @@ -1386,7 +1442,7 @@
     }
   
     /**
  -   * NEEDSDOC Method popNamespaceSupport 
  +   * Pop the current [EMAIL PROTECTED] org.xml.sax.helpers.NamespaceSupport} 
object.
      *
      */
     void popNamespaceSupport()
  @@ -1395,22 +1451,28 @@
     }
   
     /**
  -   * Get the NamespaceSupport object.
  +   * Get the current NamespaceSupport object.
      *
  -   * NEEDSDOC ($objectName$) @return
  +   * @return a non-null reference to the current NamespaceSupport object,
  +   * which is the top of the namespace support stack.
      */
     NamespaceSupport getNamespaceSupport()
     {
       return (NamespaceSupport) m_nsSupportStack.peek();
     }
   
  -  /** NEEDSDOC Field m_originatingNode          */
  +  /**
  +   * The originating node if the current stylesheet is being created
  +   *  from a DOM.
  +   *  @see org.apache.xalan.utils.NodeConsumer
  +   */
     private Node m_originatingNode;
   
     /**
      * Set the node that is originating the SAX event.
      *
  -   * NEEDSDOC @param n
  +   * @param n Reference to node that originated the current event.
  +   * @see org.apache.xalan.utils.NodeConsumer
      */
     public void setOriginatingNode(Node n)
     {
  @@ -1420,7 +1482,8 @@
     /**
      * Set the node that is originating the SAX event.
      *
  -   * NEEDSDOC ($objectName$) @return
  +   * @return Reference to node that originated the current event.
  +   * @see org.apache.xalan.utils.NodeConsumer
      */
     public Node getOriginatingNode()
     {
  
  
  
  1.6       +23 -25    
xml-xalan/java/src/org/apache/xalan/processor/StylesheetPIHandler.java
  
  Index: StylesheetPIHandler.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/processor/StylesheetPIHandler.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- StylesheetPIHandler.java  2000/11/13 16:26:51     1.5
  +++ StylesheetPIHandler.java  2000/11/22 23:25:59     1.6
  @@ -70,37 +70,35 @@
   import org.apache.xalan.utils.SystemIDResolver;
   
   /**
  - * Handle the xml-stylesheet processing instruction.
  + * Search for the xml-stylesheet processing instructions in an XML document.
    * @see <a href="http://www.w3.org/TR/xml-stylesheet/";>Associating Style 
Sheets with XML documents, Version 1.0</a>
    */
   public class StylesheetPIHandler extends DefaultHandler
   {
  -
  -  /** NEEDSDOC Field STARTELEM_FOUND_MSG          */
  -  static final String STARTELEM_FOUND_MSG = "##startElement found";
  -
  -  /** NEEDSDOC Field m_baseID          */
  +  /** The baseID of the document being processed.  */
     String m_baseID;
   
  -  /** NEEDSDOC Field m_media          */
  +  /** The desired media criteria. */
     String m_media;
   
  -  /** NEEDSDOC Field m_title          */
  +  /** The desired title criteria.  */
     String m_title;
   
  -  /** NEEDSDOC Field m_charset          */
  +  /** The desired character set criteria.   */
     String m_charset;
   
  -  /** NEEDSDOC Field m_stylesheets          */
  +  /** A list of SAXSource objects that match the criteria.  */
     Vector m_stylesheets = new Vector();
   
     /**
  -   * Construct a StylesheetPIHandler instance.
  +   * Construct a StylesheetPIHandler instance that will search 
  +   * for xml-stylesheet PIs based on the given criteria.
      *
  -   * NEEDSDOC @param source
  -   * NEEDSDOC @param media
  -   * NEEDSDOC @param title
  -   * NEEDSDOC @param charset
  +   * @param baseID The base ID of the XML document, needed to resolve 
  +   *               relative IDs.
  +   * @param media The desired media criteria.
  +   * @param title The desired title criteria.
  +   * @param charset The desired character set criteria.
      */
     public StylesheetPIHandler(String baseID, String media, String title,
                                String charset)
  @@ -113,9 +111,10 @@
     }
   
     /**
  -   * Return all stylesheets found that match the constraints.
  +   * Return the last stylesheet found that match the constraints.
      *
  -   * NEEDSDOC ($objectName$) @return
  +   * @return Source object that references the last stylesheet reference 
  +   *         that matches the constraints.
      */
     public Source getAssociatedStylesheet()
     {
  @@ -138,11 +137,9 @@
      * @param target The processing instruction target.
      * @param data The processing instruction data, or null if
      *             none is supplied.
  -   * @exception javax.xml.transform.TransformerException Any SAX exception, 
possibly
  +   * @throws org.xml.sax.SAXException Any SAX exception, possibly
      *            wrapping another exception.
      * @see org.xml.sax.ContentHandler#processingInstruction
  -   *
  -   * @throws TransformerException
      * @see <a href="http://www.w3.org/TR/xml-stylesheet/";>Associating Style 
Sheets with XML documents, Version 1.0</a>
      */
     public void processingInstruction(String target, String data)
  @@ -251,12 +248,13 @@
      * so, at least for right now, I'm going to go ahead an throw a 
TransformerException
      * in order to stop the parse.
      *
  -   * NEEDSDOC @param namespaceURI
  -   * NEEDSDOC @param localName
  -   * NEEDSDOC @param qName
  -   * NEEDSDOC @param atts
  +   * @param uri The Namespace URI, or an empty string.
  +   * @param localName The local name (without prefix), or empty string if 
not namespace processing.
  +   * @param rawName The qualified name (with prefix).
  +   * @param attributes The specified or defaulted attributes.
      *
  -   * @throws TransformerException
  +   * @throws StopParseException since there can be no valid xml-stylesheet 
processing 
  +   *                            instructions past the first element.
      */
     public void startElement(
             String namespaceURI, String localName, String qName, Attributes 
atts)
  
  
  
  1.7       +1 -1      
xml-xalan/java/src/org/apache/xalan/processor/XSLProcessorVersion.java
  
  Index: XSLProcessorVersion.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/processor/XSLProcessorVersion.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- XSLProcessorVersion.java  2000/10/31 14:39:45     1.6
  +++ XSLProcessorVersion.java  2000/11/22 23:25:59     1.7
  @@ -68,7 +68,7 @@
     /**
      * Print the processor version to the command line.
      *
  -   * NEEDSDOC @param argv
  +   * @param argv command line arguments, unused.
      */
     public static void main(String argv[])
     {
  
  
  
  1.12      +222 -196  
xml-xalan/java/src/org/apache/xalan/processor/XSLTAttributeDef.java
  
  Index: XSLTAttributeDef.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/processor/XSLTAttributeDef.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- XSLTAttributeDef.java     2000/11/13 16:26:51     1.11
  +++ XSLTAttributeDef.java     2000/11/22 23:25:59     1.12
  @@ -90,10 +90,12 @@
     /**
      * Construct an instance of XSLTAttributeDef.
      *
  -   * NEEDSDOC @param namespace
  -   * NEEDSDOC @param name
  -   * NEEDSDOC @param type
  -   * NEEDSDOC @param required
  +   * @param namespace The Namespace URI, or an empty string.
  +   * @param name The local name (without prefix), or empty string if not 
namespace processing.
  +   * @param type One of T_CDATA, T_URL, T_AVT, T_PATTERN, T_EXPR, T_CHAR, 
  +   * T_PRIORITY, T_YESNO, T_QNAME, T_QNAMES, T_ENUM, T_SIMPLEPATTERNLIST, 
  +   * T_NMTOKEN, T_STRINGLIST, T_PREFIX_URLLIST.
  +   * @param required true if this is attribute is required by the XSLT 
specification.
      */
     XSLTAttributeDef(String namespace, String name, int type, boolean required)
     {
  @@ -107,10 +109,12 @@
     /**
      * Construct an instance of XSLTAttributeDef.
      *
  -   * NEEDSDOC @param namespace
  -   * NEEDSDOC @param name
  -   * NEEDSDOC @param type
  -   * NEEDSDOC @param defaultVal
  +   * @param namespace The Namespace URI, or an empty string.
  +   * @param name The local name (without prefix), or empty string if not 
namespace processing.
  +   * @param type One of T_CDATA, T_URL, T_AVT, T_PATTERN, T_EXPR, 
  +   * T_CHAR, T_PRIORITY, T_YESNO, T_QNAME, T_QNAMES, T_ENUM, 
  +   * T_SIMPLEPATTERNLIST, T_NMTOKEN, T_STRINGLIST, T_PREFIX_URLLIST.
  +   * @param defaultVal The default value for this attribute.
      */
     XSLTAttributeDef(String namespace, String name, int type, String 
defaultVal)
     {
  @@ -126,13 +130,13 @@
      * Construct an instance of XSLTAttributeDef that uses two
      * enumerated values.
      *
  -   * NEEDSDOC @param namespace
  -   * NEEDSDOC @param name
  -   * NEEDSDOC @param required
  -   * NEEDSDOC @param k1
  -   * NEEDSDOC @param v1
  -   * NEEDSDOC @param k2
  -   * NEEDSDOC @param v2
  +   * @param namespace The Namespace URI, or an empty string.
  +   * @param name The local name (without prefix), or empty string if not 
namespace processing.
  +   * @param required true if this attribute is required by the XSLT 
specification.
  +   * @param k1 The XSLT name of the enumerated value.
  +   * @param v1 An integer representation of k1.
  +   * @param k2 The XSLT name of the enumerated value.
  +   * @param v2 An integer representation of k2.
      */
     XSLTAttributeDef(String namespace, String name, boolean required,
                      String k1, int v1, String k2, int v2)
  @@ -152,15 +156,15 @@
      * Construct an instance of XSLTAttributeDef that uses three
      * enumerated values.
      *
  -   * NEEDSDOC @param namespace
  -   * NEEDSDOC @param name
  -   * NEEDSDOC @param required
  -   * NEEDSDOC @param k1
  -   * NEEDSDOC @param v1
  -   * NEEDSDOC @param k2
  -   * NEEDSDOC @param v2
  -   * NEEDSDOC @param k3
  -   * NEEDSDOC @param v3
  +   * @param namespace The Namespace URI, or an empty string.
  +   * @param name The local name (without prefix), or empty string if not 
namespace processing.
  +   * @param required true if this attribute is required by the XSLT 
specification.
  +   * @param k1 The XSLT name of the enumerated value.
  +   * @param v1 An integer representation of k1.
  +   * @param k2 The XSLT name of the enumerated value.
  +   * @param v2 An integer representation of k2.
  +   * @param k3 The XSLT name of the enumerated value.
  +   * @param v3 An integer representation of k3.
      */
     XSLTAttributeDef(String namespace, String name, boolean required,
                      String k1, int v1, String k2, int v2, String k3, int v3)
  @@ -181,17 +185,17 @@
      * Construct an instance of XSLTAttributeDef that uses three
      * enumerated values.
      *
  -   * NEEDSDOC @param namespace
  -   * NEEDSDOC @param name
  -   * NEEDSDOC @param required
  -   * NEEDSDOC @param k1
  -   * NEEDSDOC @param v1
  -   * NEEDSDOC @param k2
  -   * NEEDSDOC @param v2
  -   * NEEDSDOC @param k3
  -   * NEEDSDOC @param v3
  -   * NEEDSDOC @param k4
  -   * NEEDSDOC @param v4
  +   * @param namespace The Namespace URI, or an empty string.
  +   * @param name The local name (without prefix), or empty string if not 
namespace processing.
  +   * @param required true if this attribute is required by the XSLT 
specification.
  +   * @param k1 The XSLT name of the enumerated value.
  +   * @param v1 An integer representation of k1.
  +   * @param k2 The XSLT name of the enumerated value.
  +   * @param v2 An integer representation of k2.
  +   * @param k3 The XSLT name of the enumerated value.
  +   * @param v3 An integer representation of k3.
  +   * @param k4 The XSLT name of the enumerated value.
  +   * @param v4 An integer representation of k4.
      */
     XSLTAttributeDef(String namespace, String name, boolean required,
                      String k1, int v1, String k2, int v2, String k3, int v3,
  @@ -209,8 +213,8 @@
       m_enums.put(k3, v3);
       m_enums.put(k4, v4);
     }
  -
  -  /** NEEDSDOC Field T_CDATA, T_URL, T_AVT, T_PATTERN, T_EXPR, T_CHAR, 
T_PRIORITY, T_YESNO, T_QNAME, T_QNAMES, T_ENUM, T_SIMPLEPATTERNLIST, T_NMTOKEN, 
T_STRINGLIST, T_PREFIX_URLLIST          */
  + 
  +  /** Type values that represent XSLT attribute types.    */
     static final int T_CDATA = 1,
   
       // <!-- Used for the type of an attribute value that is a URI 
reference.-->
  @@ -258,7 +262,7 @@
       // Used for a list of white-space delimited strings.
       T_PREFIX_URLLIST = 15;
   
  -  /** NEEDSDOC Field m_foreignAttr          */
  +  /** Representation for an attribute in a foreign namespace.  */
     static XSLTAttributeDef m_foreignAttr = new XSLTAttributeDef("*", "*",
                                                                  
XSLTAttributeDef.T_CDATA, false);
   
  @@ -268,9 +272,9 @@
     private String m_namespace;
   
     /**
  -   * Get the allowed namespace for this element.
  +   * Get the allowed namespace for this attribute.
      *
  -   * NEEDSDOC ($objectName$) @return
  +   * @return The allowed namespace for this attribute, which may be null, or 
may be "*".
      */
     String getNamespace()
     {
  @@ -283,9 +287,9 @@
     private String m_name;
   
     /**
  -   * Get the name of this element.
  +   * Get the name of this attribute.
      *
  -   * NEEDSDOC ($objectName$) @return
  +   * @return non-null reference to the name of this attribute, which may be 
"*".
      */
     String getName()
     {
  @@ -300,7 +304,9 @@
     /**
      * Get the type of this attribute value.
      *
  -   * NEEDSDOC ($objectName$) @return
  +   * @return One of T_CDATA, T_URL, T_AVT, T_PATTERN, T_EXPR, T_CHAR, 
  +   * T_PRIORITY, T_YESNO, T_QNAME, T_QNAMES, T_ENUM, T_SIMPLEPATTERNLIST, 
  +   * T_NMTOKEN, T_STRINGLIST, T_PREFIX_URLLIST.
      */
     int getType()
     {
  @@ -320,7 +326,7 @@
      * value.
      * @param key The XSLT attribute value.
      *
  -   * NEEDSDOC ($objectName$) @return
  +   * @return The integer representation of the enumerated value for this 
attribute.
      * @exception Throws NullPointerException if m_enums is null.
      */
     private int getEnum(String key)
  @@ -336,7 +342,7 @@
     /**
      * Get the default value for this attribute.
      *
  -   * NEEDSDOC ($objectName$) @return
  +   * @return The default value for this attribute, or null.
      */
     String getDefault()
     {
  @@ -346,7 +352,7 @@
     /**
      * Set the default value for this attribute.
      *
  -   * NEEDSDOC @param def
  +   * @param def String representation of the default value for this 
attribute.
      */
     void setDefault(String def)
     {
  @@ -361,21 +367,26 @@
     /**
      * Get whether or not this is a required attribute.
      *
  -   * NEEDSDOC ($objectName$) @return
  +   * @return true if this is a required attribute.
      */
     boolean getRequired()
     {
       return m_required;
     }
   
  -  /** NEEDSDOC Field m_setterString          */
  +  /** String that should represent the setter method which which 
  +   * may be used on objects to set a value that represents this attribute  */
     String m_setterString = null;
   
     /**
      * Return a string that should represent the setter method.
  -   * The setter method name will be created algorithmically
  -   *
  -   * NEEDSDOC ($objectName$) @return
  +   * The setter method name will be created algorithmically the 
  +   * first time this method is accessed, and then cached for return
  +   * by subsequent invocations of this method.
  +   *
  +   * @return String that should represent the setter method which which 
  +   * may be used on objects to set a value that represents this attribute, 
  +   * of null if no setter method should be called.
      */
     public String getSetterMethodName()
     {
  @@ -431,16 +442,18 @@
     /**
      * Process an attribute string of type T_AVT into
      * a AVT value.
  -   *
  -   * NEEDSDOC @param handler
  -   * NEEDSDOC @param uri
  -   * NEEDSDOC @param name
  -   * NEEDSDOC @param rawName
  -   * NEEDSDOC @param value
      *
  -   * NEEDSDOC ($objectName$) @return
  -   *
  -   * @throws org.xml.sax.SAXException
  +   * @param handler non-null reference to current StylesheetHandler that is 
constructing the Templates.
  +   * @param uri The Namespace URI, or an empty string.
  +   * @param name The local name (without prefix), or empty string if not 
namespace processing.
  +   * @param rawName The qualified name (with prefix).
  +   * @param value Should be an Attribute Value Template string.
  +   *
  +   * @return An AVT object that may be used to evaluate the Attribute Value 
Template.
  +   *
  +   * @throws org.xml.sax.SAXException which will wrap a 
  +   * [EMAIL PROTECTED] javax.xml.transform.TransformerException}, if there 
is a syntax error 
  +   * in the attribute value template string.
      */
     AVT processAVT(
                    StylesheetHandler handler, String uri, String name, String 
rawName, String value)
  @@ -462,20 +475,17 @@
     /**
      * Process an attribute string of type T_CDATA into
      * a String value.
  -   *
  -   * NEEDSDOC @param handler
  -   * NEEDSDOC @param uri
  -   * NEEDSDOC @param name
  -   * NEEDSDOC @param rawName
  -   * NEEDSDOC @param value
      *
  -   * NEEDSDOC ($objectName$) @return
  +   * @param handler non-null reference to current StylesheetHandler that is 
constructing the Templates.
  +   * @param uri The Namespace URI, or an empty string.
  +   * @param name The local name (without prefix), or empty string if not 
namespace processing.
  +   * @param rawName The qualified name (with prefix).
  +   * @param value non-null string reference.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @return The value argument.
      */
     Object processCDATA(
                         StylesheetHandler handler, String uri, String name, 
String rawName, String value)
  -    throws org.xml.sax.SAXException
     {
       return value;
     }
  @@ -484,15 +494,15 @@
      * Process an attribute string of type T_CHAR into
      * a Character value.
      *
  -   * NEEDSDOC @param handler
  -   * NEEDSDOC @param uri
  -   * NEEDSDOC @param name
  -   * NEEDSDOC @param rawName
  -   * NEEDSDOC @param value
  +   * @param handler non-null reference to current StylesheetHandler that is 
constructing the Templates.
  +   * @param uri The Namespace URI, or an empty string.
  +   * @param name The local name (without prefix), or empty string if not 
namespace processing.
  +   * @param rawName The qualified name (with prefix).
  +   * @param value Should be a string with a length of 1.
      *
  -   * NEEDSDOC ($objectName$) @return
  +   * @return Character object.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws org.xml.sax.SAXException if the string is not a length of 1.
      */
     Object processCHAR(
                        StylesheetHandler handler, String uri, String name, 
String rawName, String value)
  @@ -512,19 +522,17 @@
      * Process an attribute string of type T_ENUM into
      * a int value.
      *
  -   * NEEDSDOC @param handler
  -   * NEEDSDOC @param uri
  -   * NEEDSDOC @param name
  -   * NEEDSDOC @param rawName
  -   * NEEDSDOC @param value
  +   * @param handler non-null reference to current StylesheetHandler that is 
constructing the Templates.
  +   * @param uri The Namespace URI, or an empty string.
  +   * @param name The local name (without prefix), or empty string if not 
namespace processing.
  +   * @param rawName The qualified name (with prefix).
  +   * @param value non-null string that represents an enumerated value that 
is 
  +   * valid for this element.
      *
  -   * NEEDSDOC ($objectName$) @return
  -   *
  -   * @throws org.xml.sax.SAXException
  +   * @return An Integer representation of the enumerated value.
      */
     Object processENUM(
                        StylesheetHandler handler, String uri, String name, 
String rawName, String value)
  -    throws org.xml.sax.SAXException
     {
   
       int enum = this.getEnum(value);
  @@ -536,15 +544,17 @@
      * Process an attribute string of type T_EXPR into
      * an XPath value.
      *
  -   * NEEDSDOC @param handler
  -   * NEEDSDOC @param uri
  -   * NEEDSDOC @param name
  -   * NEEDSDOC @param rawName
  -   * NEEDSDOC @param value
  -   *
  -   * NEEDSDOC ($objectName$) @return
  -   *
  -   * @throws org.xml.sax.SAXException
  +   * @param handler non-null reference to current StylesheetHandler that is 
constructing the Templates.
  +   * @param uri The Namespace URI, or an empty string.
  +   * @param name The local name (without prefix), or empty string if not 
namespace processing.
  +   * @param rawName The qualified name (with prefix).
  +   * @param value An XSLT expression string.
  +   *
  +   * @return an XPath object that may be used for evaluation.
  +   *
  +   * @throws org.xml.sax.SAXException that wraps a 
  +   * [EMAIL PROTECTED] javax.xml.transform.TransformerException} if the 
expression 
  +   * string contains a syntax error.
      */
     Object processEXPR(
                        StylesheetHandler handler, String uri, String name, 
String rawName, String value)
  @@ -567,19 +577,16 @@
      * Process an attribute string of type T_NMTOKEN into
      * a String value.
      *
  -   * NEEDSDOC @param handler
  -   * NEEDSDOC @param uri
  -   * NEEDSDOC @param name
  -   * NEEDSDOC @param rawName
  -   * NEEDSDOC @param value
  +   * @param handler non-null reference to current StylesheetHandler that is 
constructing the Templates.
  +   * @param uri The Namespace URI, or an empty string.
  +   * @param name The local name (without prefix), or empty string if not 
namespace processing.
  +   * @param rawName The qualified name (with prefix).
  +   * @param value A NMTOKEN string.
      *
  -   * NEEDSDOC ($objectName$) @return
  -   *
  -   * @throws org.xml.sax.SAXException
  +   * @return the value argument.
      */
     Object processNMTOKEN(
                           StylesheetHandler handler, String uri, String name, 
String rawName, String value)
  -    throws org.xml.sax.SAXException
     {
       return value;
     }
  @@ -588,15 +595,17 @@
      * Process an attribute string of type T_PATTERN into
      * an XPath match pattern value.
      *
  -   * NEEDSDOC @param handler
  -   * NEEDSDOC @param uri
  -   * NEEDSDOC @param name
  -   * NEEDSDOC @param rawName
  -   * NEEDSDOC @param value
  -   *
  -   * NEEDSDOC ($objectName$) @return
  -   *
  -   * @throws org.xml.sax.SAXException
  +   * @param handler non-null reference to current StylesheetHandler that is 
constructing the Templates.
  +   * @param uri The Namespace URI, or an empty string.
  +   * @param name The local name (without prefix), or empty string if not 
namespace processing.
  +   * @param rawName The qualified name (with prefix).
  +   * @param value A match pattern string.
  +   *
  +   * @return An XPath pattern that may be used to evaluate the XPath.
  +   *
  +   * @throws org.xml.sax.SAXException that wraps a 
  +   * [EMAIL PROTECTED] javax.xml.transform.TransformerException} if the 
match pattern 
  +   * string contains a syntax error.
      */
     Object processPATTERN(
                           StylesheetHandler handler, String uri, String name, 
String rawName, String value)
  @@ -618,37 +627,48 @@
     /**
      * Process an attribute string of type T_PRIORITY into
      * a double value.
  -   *
  -   * NEEDSDOC @param handler
  -   * NEEDSDOC @param uri
  -   * NEEDSDOC @param name
  -   * NEEDSDOC @param rawName
  -   * NEEDSDOC @param value
  -   *
  -   * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @param handler non-null reference to current StylesheetHandler that is 
constructing the Templates.
  +   * @param uri The Namespace URI, or an empty string.
  +   * @param name The local name (without prefix), or empty string if not 
namespace processing.
  +   * @param rawName The qualified name (with prefix).
  +   * @param value A string that can be parsed into a double value.
  +   *
  +   * @return A Double object.
  +   *
  +   * @throws org.xml.sax.SAXException that wraps a 
  +   * [EMAIL PROTECTED] javax.xml.transform.TransformerException} 
  +   * if the string does not contain a parsable number.
      */
     Object processPRIORITY(
                            StylesheetHandler handler, String uri, String name, 
String rawName, String value)
       throws org.xml.sax.SAXException
     {
  -    return Double.valueOf(value);
  +    try
  +    {
  +      return Double.valueOf(value);
  +    }
  +    catch(NumberFormatException nfe)
  +    {
  +      handler.error("Priority value does not contain a parsable number.", 
nfe);
  +      return new Double(0.0);
  +    }
     }
   
     /**
      * Process an attribute string of type T_QNAME into
      * a QName value.
      *
  -   * NEEDSDOC @param handler
  -   * NEEDSDOC @param uri
  -   * NEEDSDOC @param name
  -   * NEEDSDOC @param rawName
  -   * NEEDSDOC @param value
  +   * @param handler non-null reference to current StylesheetHandler that is 
constructing the Templates.
  +   * @param uri The Namespace URI, or an empty string.
  +   * @param name The local name (without prefix), or empty string if not 
namespace processing.
  +   * @param rawName The qualified name (with prefix).
  +   * @param value A string that represents a potentially prefix qualified 
name.
      *
  -   * NEEDSDOC ($objectName$) @return
  +   * @return A QName object.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws org.xml.sax.SAXException if the string contains a prefix that 
can not be 
  +   * resolved, or the string contains syntax that is invalid for a qualified 
name.
      */
     Object processQNAME(
                         StylesheetHandler handler, String uri, String name, 
String rawName, String value)
  @@ -660,16 +680,18 @@
     /**
      * Process an attribute string of type T_QNAMES into
      * a vector of QNames.
  -   *
  -   * NEEDSDOC @param handler
  -   * NEEDSDOC @param uri
  -   * NEEDSDOC @param name
  -   * NEEDSDOC @param rawName
  -   * NEEDSDOC @param value
  -   *
  -   * NEEDSDOC ($objectName$) @return
      *
  -   * @throws org.xml.sax.SAXException
  +   * @param handler non-null reference to current StylesheetHandler that is 
constructing the Templates.
  +   * @param uri The Namespace URI, or an empty string.
  +   * @param name The local name (without prefix), or empty string if not 
namespace processing.
  +   * @param rawName The qualified name (with prefix).
  +   * @param value A whitespace delimited list of qualified names.
  +   *
  +   * @return a Vector of QName objects.
  +   *
  +   * @throws org.xml.sax.SAXException if the one of the qualified name 
strings
  +   * contains a prefix that can not be 
  +   * resolved, or a qualified name contains syntax that is invalid for a 
qualified name.
      */
     Vector processQNAMES(
                          StylesheetHandler handler, String uri, String name, 
String rawName, String value)
  @@ -691,16 +713,18 @@
     /**
      * Process an attribute string of type T_SIMPLEPATTERNLIST into
      * a vector of XPath match patterns.
  -   *
  -   * NEEDSDOC @param handler
  -   * NEEDSDOC @param uri
  -   * NEEDSDOC @param name
  -   * NEEDSDOC @param rawName
  -   * NEEDSDOC @param value
      *
  -   * NEEDSDOC ($objectName$) @return
  -   *
  -   * @throws org.xml.sax.SAXException
  +   * @param handler non-null reference to current StylesheetHandler that is 
constructing the Templates.
  +   * @param uri The Namespace URI, or an empty string.
  +   * @param name The local name (without prefix), or empty string if not 
namespace processing.
  +   * @param rawName The qualified name (with prefix).
  +   * @param value A whitespace delimited list of simple match patterns.
  +   *
  +   * @return A Vector of XPath objects.
  +   *
  +   * @throws org.xml.sax.SAXException that wraps a 
  +   * [EMAIL PROTECTED] javax.xml.transform.TransformerException} if one of 
the match pattern 
  +   * strings contains a syntax error.
      */
     Vector processSIMPLEPATTERNLIST(
                                     StylesheetHandler handler, String uri, 
String name, String rawName, String value)
  @@ -731,20 +755,17 @@
     /**
      * Process an attribute string of type T_STRINGLIST into
      * a vector of XPath match patterns.
  -   *
  -   * NEEDSDOC @param handler
  -   * NEEDSDOC @param uri
  -   * NEEDSDOC @param name
  -   * NEEDSDOC @param rawName
  -   * NEEDSDOC @param value
      *
  -   * NEEDSDOC ($objectName$) @return
  +   * @param handler non-null reference to current StylesheetHandler that is 
constructing the Templates.
  +   * @param uri The Namespace URI, or an empty string.
  +   * @param name The local name (without prefix), or empty string if not 
namespace processing.
  +   * @param rawName The qualified name (with prefix).
  +   * @param value a whitespace delimited list of string values.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @return A StringVector of the tokenized strings.
      */
     StringVector processSTRINGLIST(
                                    StylesheetHandler handler, String uri, 
String name, String rawName, String value)
  -    throws org.xml.sax.SAXException
     {
   
       StringTokenizer tokenizer = new StringTokenizer(value, " \t\n\r\f");
  @@ -761,17 +782,17 @@
   
     /**
      * Process an attribute string of type T_URLLIST into
  -   * a vector of XPath match patterns.
  +   * a vector of prefixes that may be resolved to URLs.
      *
  -   * NEEDSDOC @param handler
  -   * NEEDSDOC @param uri
  -   * NEEDSDOC @param name
  -   * NEEDSDOC @param rawName
  -   * NEEDSDOC @param value
  +   * @param handler non-null reference to current StylesheetHandler that is 
constructing the Templates.
  +   * @param uri The Namespace URI, or an empty string.
  +   * @param name The local name (without prefix), or empty string if not 
namespace processing.
  +   * @param rawName The qualified name (with prefix).
  +   * @param value A list of whitespace delimited prefixes.
      *
  -   * NEEDSDOC ($objectName$) @return
  +   * @return A vector of strings that may be resolved to URLs.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws org.xml.sax.SAXException if one of the prefixes can not be 
resolved.
      */
     StringVector processPREFIX_URLLIST(
                                        StylesheetHandler handler, String uri, 
String name, String rawName, String value)
  @@ -797,21 +818,21 @@
      * Process an attribute string of type T_URL into
      * a URL value.
      *
  -   * NEEDSDOC @param handler
  -   * NEEDSDOC @param uri
  -   * NEEDSDOC @param name
  -   * NEEDSDOC @param rawName
  -   * NEEDSDOC @param value
  +   * @param handler non-null reference to current StylesheetHandler that is 
constructing the Templates.
  +   * @param uri The Namespace URI, or an empty string.
  +   * @param name The local name (without prefix), or empty string if not 
namespace processing.
  +   * @param rawName The qualified name (with prefix).
  +   * @param value non-null string that conforms to the URL syntax.
      *
  -   * NEEDSDOC ($objectName$) @return
  +   * @return The non-absolutized URL argument, in other words, the value 
argument.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws org.xml.sax.SAXException if the URL does not conform to the URL 
syntax.
      */
     String processURL(
                       StylesheetHandler handler, String uri, String name, 
String rawName, String value)
       throws org.xml.sax.SAXException
     {
  -
  +    // TODO: syntax check URL value.
       // return SystemIDResolver.getAbsoluteURI(value, 
       //                                         handler.getBaseIdentifier());
       return value;
  @@ -821,13 +842,13 @@
      * Process an attribute string of type T_YESNO into
      * a Boolean value.
      *
  -   * NEEDSDOC @param handler
  -   * NEEDSDOC @param uri
  -   * NEEDSDOC @param name
  -   * NEEDSDOC @param rawName
  -   * NEEDSDOC @param value
  +   * @param handler non-null reference to current StylesheetHandler that is 
constructing the Templates.
  +   * @param uri The Namespace URI, or an empty string.
  +   * @param name The local name (without prefix), or empty string if not 
namespace processing.
  +   * @param rawName The qualified name (with prefix).
  +   * @param value A string that should be "yes" or "no".
      *
  -   * NEEDSDOC ($objectName$) @return
  +   * @return Boolean object representation of the value.
      *
      * @throws org.xml.sax.SAXException
      */
  @@ -835,21 +856,25 @@
                                  StylesheetHandler handler, String uri, String 
name, String rawName, String value)
       throws org.xml.sax.SAXException
     {
  +    // Is this already checked somewhere else?  -sb
  +    if(!(value.equals("yes") || value.equals("no")))
  +      handler.error("Value for "+name+" should equal 'yes' or 'no'", null);
  +      
       return new Boolean(value.equals("yes") ? true : false);
     }
   
     /**
      * Process an attribute value.
      *
  -   * NEEDSDOC @param handler
  -   * NEEDSDOC @param uri
  -   * NEEDSDOC @param name
  -   * NEEDSDOC @param rawName
  -   * NEEDSDOC @param value
  +   * @param handler non-null reference to current StylesheetHandler that is 
constructing the Templates.
  +   * @param uri The Namespace URI, or an empty string.
  +   * @param name The local name (without prefix), or empty string if not 
namespace processing.
  +   * @param rawName The qualified name (with prefix).
  +   * @param value The unprocessed string value of the attribute.
      *
  -   * NEEDSDOC ($objectName$) @return
  +   * @return The processed Object representation of the attribute.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws org.xml.sax.SAXException if the attribute value can not be 
processed.
      */
     Object processValue(
                         StylesheetHandler handler, String uri, String name, 
String rawName, String value)
  @@ -917,10 +942,11 @@
     /**
      * Set the default value of an attribute.
      *
  -   * NEEDSDOC @param handler
  -   * NEEDSDOC @param elem
  +   * @param handler non-null reference to current StylesheetHandler that is 
constructing the Templates.
  +   * @param elem The object on which the property will be set.
      *
  -   * @throws org.xml.sax.SAXException
  +   * @throws org.xml.sax.SAXException wraps an invocation exception if the 
  +   * setter method can not be invoked on the object.
      */
     void setDefAttrValue(StylesheetHandler handler, Object elem)
       throws org.xml.sax.SAXException
  @@ -936,9 +962,9 @@
      * of the 9 primative types, it will return the same
      * class that was passed in.
      *
  -   * NEEDSDOC @param obj
  +   * @param obj The object which will be resolved to a primative class 
object if possible.
      *
  -   * NEEDSDOC ($objectName$) @return
  +   * @return The most primative class representation possible for the 
object, never null.
      */
     private Class getPrimativeClass(Object obj)
     {
  @@ -988,12 +1014,12 @@
     /**
      * Set a value on an attribute.
      *
  -   * NEEDSDOC @param handler
  -   * NEEDSDOC @param attrUri
  -   * NEEDSDOC @param attrLocalName
  -   * NEEDSDOC @param attrRawName
  -   * NEEDSDOC @param attrValue
  -   * NEEDSDOC @param elem
  +   * @param handler non-null reference to current StylesheetHandler that is 
constructing the Templates.
  +   * @param attrUri The Namespace URI of the attribute, or an empty string.
  +   * @param attrLocalName The local name (without prefix), or empty string 
if not namespace processing.
  +   * @param attrRawName The raw name of the attribute, including possible 
prefix.
  +   * @param attrValue The attribute's value.
  +   * @param elem The object what should contain a property that represents 
the attribute.
      *
      * @throws org.xml.sax.SAXException
      */
  
  
  
  1.8       +57 -51    
xml-xalan/java/src/org/apache/xalan/processor/XSLTElementDef.java
  
  Index: XSLTElementDef.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/processor/XSLTElementDef.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- XSLTElementDef.java       2000/11/03 23:28:03     1.7
  +++ XSLTElementDef.java       2000/11/22 23:26:00     1.8
  @@ -78,13 +78,13 @@
     /**
      * Construct an instance of XSLTElementDef.
      *
  -   * NEEDSDOC @param namespace
  -   * NEEDSDOC @param name
  -   * NEEDSDOC @param nameAlias
  -   * NEEDSDOC @param elements
  -   * NEEDSDOC @param attributes
  -   * NEEDSDOC @param contentHandler
  -   * NEEDSDOC @param classObject
  +   * @param namespace  The Namespace URI, "*", or null.
  +   * @param name The local name (without prefix), "*", or null.
  +   * @param nameAlias A potential alias for the name, or null.
  +   * @param elements An array of allowed child element defs, or null.
  +   * @param attributes An array of allowed attribute defs, or null.
  +   * @param contentHandler The element processor for this element.
  +   * @param classObject The class of the object that this element def should 
produce.
      */
     XSLTElementDef(String namespace, String name, String nameAlias,
                    XSLTElementDef[] elements, XSLTAttributeDef[] attributes,
  @@ -97,9 +97,9 @@
     /**
      * Construct an instance of XSLTElementDef that represents text.
      *
  -   * NEEDSDOC @param classObject
  -   * NEEDSDOC @param contentHandler
  -   * NEEDSDOC @param type
  +   * @param classObject The class of the object that this element def should 
produce.
  +   * @param contentHandler The element processor for this element.
  +   * @param type Content type, one of T_ELEMENT, T_PCDATA, or T_ANY.
      */
     XSLTElementDef(Class classObject, XSLTElementProcessor contentHandler,
                    int type)
  @@ -114,13 +114,13 @@
     /**
      * Construct an instance of XSLTElementDef.
      *
  -   * NEEDSDOC @param namespace
  -   * NEEDSDOC @param name
  -   * NEEDSDOC @param nameAlias
  -   * NEEDSDOC @param elements
  -   * NEEDSDOC @param attributes
  -   * NEEDSDOC @param contentHandler
  -   * NEEDSDOC @param classObject
  +   * @param namespace  The Namespace URI, "*", or null.
  +   * @param name The local name (without prefix), "*", or null.
  +   * @param nameAlias A potential alias for the name, or null.
  +   * @param elements An array of allowed child element defs, or null.
  +   * @param attributes An array of allowed attribute defs, or null.
  +   * @param contentHandler The element processor for this element.
  +   * @param classObject The class of the object that this element def should 
produce.
      */
     void build(String namespace, String name, String nameAlias,
                XSLTElementDef[] elements, XSLTAttributeDef[] attributes,
  @@ -142,14 +142,15 @@
      * Tell if two objects are equal, when either one may be null.
      * If both are null, they are considered equal.
      *
  -   * NEEDSDOC @param obj1
  -   * NEEDSDOC @param obj2
  +   * @param obj1 A reference to the first object, or null.
  +   * @param obj2 A reference to the second object, or null.
      *
  -   * NEEDSDOC ($objectName$) @return
  +   * @return true if the to objects are equal by both being null or 
  +   * because obj2.equals(obj1) returns true.
      */
     private static boolean equalsMayBeNull(Object obj1, Object obj2)
     {
  -    return ((null == obj1) && (null == obj2))
  +    return (obj2 == obj1)
              || ((null != obj1) && (null != obj2) && obj2.equals(obj1));
     }
   
  @@ -160,10 +161,13 @@
      * 2) One string is null and the other is empty.
      * 3) Both strings are non-null, and equal.
      *
  -   * NEEDSDOC @param s1
  -   * NEEDSDOC @param s2
  +   * @param s1 A reference to the first string, or null.
  +   * @param s2 A reference to the second string, or null.
      *
  -   * NEEDSDOC ($objectName$) @return
  +   * @return true if Both strings are null, or if 
  +   * one string is null and the other is empty, or if 
  +   * both strings are non-null, and equal because 
  +   * s1.equals(s2) returns true.
      */
     private static boolean equalsMayBeNullOrZeroLen(String s1, String s2)
     {
  @@ -174,7 +178,7 @@
       return (len1 != len2) ? false : (len1 == 0) ? true : s1.equals(s2);
     }
   
  -  /** NEEDSDOC Field T_ELEMENT, T_PCDATA, T_ANY          */
  +  /** Content type enumerations    */
     static final int T_ELEMENT = 1, T_PCDATA = 2, T_ANY = 3;
   
     /**
  @@ -185,7 +189,7 @@
     /**
      * Get the type of this element.
      *
  -   * NEEDSDOC ($objectName$) @return
  +   * @return Content type, one of T_ELEMENT, T_PCDATA, or T_ANY.
      */
     int getType()
     {
  @@ -195,7 +199,7 @@
     /**
      * Set the type of this element.
      *
  -   * NEEDSDOC @param t
  +   * @param t Content type, one of T_ELEMENT, T_PCDATA, or T_ANY.
      */
     void setType(int t)
     {
  @@ -210,7 +214,7 @@
     /**
      * Get the allowed namespace for this element.
      *
  -   * NEEDSDOC ($objectName$) @return
  +   * @return The Namespace URI, "*", or null.
      */
     String getNamespace()
     {
  @@ -223,9 +227,9 @@
     private String m_name;
   
     /**
  -   * Get the name of this element.
  +   * Get the local name of this element.
      *
  -   * NEEDSDOC ($objectName$) @return
  +   * @return The local name of this element, "*", or null.
      */
     String getName()
     {
  @@ -240,7 +244,7 @@
     /**
      * Get the name of this element.
      *
  -   * NEEDSDOC ($objectName$) @return
  +   * @return A potential alias for the name, or null.
      */
     String getNameAlias()
     {
  @@ -255,7 +259,7 @@
     /**
      * Get the allowed elements for this type.
      *
  -   * NEEDSDOC ($objectName$) @return
  +   * @return An array of allowed child element defs, or null.
      */
     XSLTElementDef[] getElements()
     {
  @@ -265,7 +269,7 @@
     /**
      * Set the allowed elements for this type.
      *
  -   * NEEDSDOC @param defs
  +   * @param defs An array of allowed child element defs, or null.
      */
     void setElements(XSLTElementDef[] defs)
     {
  @@ -278,7 +282,8 @@
      * @param uri The namespace uri, which may be null.
      * @param localName The local name of an element, which may be null.
      *
  -   * NEEDSDOC ($objectName$) @return
  +   * @return true if the uri and local name arguments are considered 
  +   * to match the uri and local name of this element def.
      */
     private boolean QNameEquals(String uri, String localName)
     {
  @@ -292,10 +297,10 @@
      * Given a namespace URI, and a local name, get the processor
      * for the element, or return null if not allowed.
      *
  -   * NEEDSDOC @param uri
  -   * NEEDSDOC @param localName
  +   * @param uri The Namespace URI, or an empty string.
  +   * @param localName The local name (without prefix), or empty string if 
not namespace processing.
      *
  -   * NEEDSDOC ($objectName$) @return
  +   * @return The element processor that matches the arguments, or null.
      */
     XSLTElementProcessor getProcessorFor(String uri, String localName)
     {
  @@ -329,13 +334,14 @@
     }
   
     /**
  -   * Given an unknown element , get the processor
  -   * for the element
  +   * Given an unknown element, get the processor
  +   * for the element.
      *
  -   * NEEDSDOC @param uri
  -   * NEEDSDOC @param localName
  +   * @param uri The Namespace URI, or an empty string.
  +   * @param localName The local name (without prefix), or empty string if 
not namespace processing.
      *
  -   * NEEDSDOC ($objectName$) @return
  +   * @return normally a [EMAIL PROTECTED] ProcessorUnknown} reference.
  +   * @see ProcessorUnknown
      */
     XSLTElementProcessor getProcessorForUnknown(String uri, String localName)
     {
  @@ -367,7 +373,7 @@
     /**
      * Get the allowed attributes for this type.
      *
  -   * NEEDSDOC ($objectName$) @return
  +   * @return An array of allowed attribute defs, or null.
      */
     XSLTAttributeDef[] getAttributes()
     {
  @@ -378,10 +384,10 @@
      * Given a namespace URI, and a local name, return the element's
      * attribute definition, if it has one.
      *
  -   * NEEDSDOC @param uri
  -   * NEEDSDOC @param localName
  +   * @param uri The Namespace URI, or an empty string.
  +   * @param localName The local name (without prefix), or empty string if 
not namespace processing.
      *
  -   * NEEDSDOC ($objectName$) @return
  +   * @return The attribute def that matches the arguments, or null.
      */
     XSLTAttributeDef getAttributeDef(String uri, String localName)
     {
  @@ -431,9 +437,9 @@
     private XSLTElementProcessor m_elementProcessor;
   
     /**
  -   * Return the ContentHandler/TransformerFactory for this element.
  +   * Return the XSLTElementProcessor for this element.
      *
  -   * NEEDSDOC ($objectName$) @return
  +   * @return The element processor for this element.
      */
     XSLTElementProcessor getElementProcessor()
     {
  @@ -441,9 +447,9 @@
     }
   
     /**
  -   * Return the ContentHandler/TransformerFactory for this element.
  +   * Set the XSLTElementProcessor for this element.
      *
  -   * NEEDSDOC @param handler
  +   * @param handler The element processor for this element.
      */
     void setElementProcessor(XSLTElementProcessor handler)
     {
  @@ -466,7 +472,7 @@
      * Return the class object that should in instantiated for
      * a Xalan instance of this element.
      *
  -   * NEEDSDOC ($objectName$) @return
  +   * @return The class of the object that this element def should produce, 
or null.
      */
     Class getClassObject()
     {
  
  
  
  1.7       +18 -18    
xml-xalan/java/src/org/apache/xalan/processor/XSLTElementProcessor.java
  
  Index: XSLTElementProcessor.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/processor/XSLTElementProcessor.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- XSLTElementProcessor.java 2000/11/13 16:26:51     1.6
  +++ XSLTElementProcessor.java 2000/11/22 23:26:00     1.7
  @@ -93,7 +93,7 @@
     /**
      * Get the element definition that belongs to this element.
      *
  -   * NEEDSDOC ($objectName$) @return
  +   * @return The element definition object that produced and constrains this 
element.
      */
     XSLTElementDef getElemDef()
     {
  @@ -103,7 +103,7 @@
     /**
      * Set the element definition that belongs to this element.
      *
  -   * NEEDSDOC @param def
  +   * @param def The element definition object that produced and constrains 
this element.
      */
     void setElemDef(XSLTElementDef def)
     {
  @@ -114,7 +114,7 @@
      * Resolve an external entity.
      *
      *
  -   * NEEDSDOC @param handler
  +   * @param handler non-null reference to current StylesheetHandler that is 
constructing the Templates.
      * @param publicId The public identifer, or null if none is
      *                 available.
      * @param systemId The system identifier provided in the XML
  @@ -133,7 +133,7 @@
      * Receive notification of a notation declaration.
      *
      *
  -   * NEEDSDOC @param handler
  +   * @param handler non-null reference to current StylesheetHandler that is 
constructing the Templates.
      * @param name The notation name.
      * @param publicId The notation public identifier, or null if not
      *                 available.
  @@ -151,7 +151,7 @@
      * Receive notification of an unparsed entity declaration.
      *
      *
  -   * NEEDSDOC @param handler
  +   * @param handler non-null reference to current StylesheetHandler that is 
constructing the Templates.
      * @param name The entity name.
      * @param publicId The entity public identifier, or null if not
      *                 available.
  @@ -171,7 +171,7 @@
      * Receive notification of the start of the non-text event.  This
      * is sent to the current processor when any non-text event occurs.
      *
  -   * NEEDSDOC @param handler
  +   * @param handler non-null reference to current StylesheetHandler that is 
constructing the Templates.
      */
     public void startNonText(StylesheetHandler handler) throws 
org.xml.sax.SAXException
     {
  @@ -184,10 +184,10 @@
      *
      * @param name The element type name.
      *
  -   * NEEDSDOC @param handler
  -   * NEEDSDOC @param uri
  -   * NEEDSDOC @param localName
  -   * NEEDSDOC @param rawName
  +   * @param handler non-null reference to current StylesheetHandler that is 
constructing the Templates.
  +   * @param uri The Namespace URI, or an empty string.
  +   * @param localName The local name (without prefix), or empty string if 
not namespace processing.
  +   * @param rawName The qualified name (with prefix).
      * @param attributes The specified or defaulted attributes.
      */
     public void startElement(
  @@ -204,10 +204,10 @@
      * @param name The element type name.
      * @param attributes The specified or defaulted attributes.
      *
  -   * NEEDSDOC @param handler
  -   * NEEDSDOC @param uri
  -   * NEEDSDOC @param localName
  -   * NEEDSDOC @param rawName
  +   * @param handler non-null reference to current StylesheetHandler that is 
constructing the Templates.
  +   * @param uri The Namespace URI, or an empty string.
  +   * @param localName The local name (without prefix), or empty string if 
not namespace processing.
  +   * @param rawName The qualified name (with prefix).
      */
     public void endElement(
             StylesheetHandler handler, String uri, String localName, String 
rawName)
  @@ -221,7 +221,7 @@
      * Receive notification of character data inside an element.
      *
      *
  -   * NEEDSDOC @param handler
  +   * @param handler non-null reference to current StylesheetHandler that is 
constructing the Templates.
      * @param ch The characters.
      * @param start The start position in the character array.
      * @param length The number of characters to use from the
  @@ -239,7 +239,7 @@
      * Receive notification of ignorable whitespace in element content.
      *
      *
  -   * NEEDSDOC @param handler
  +   * @param handler non-null reference to current StylesheetHandler that is 
constructing the Templates.
      * @param ch The whitespace characters.
      * @param start The start position in the character array.
      * @param length The number of characters to use from the
  @@ -257,7 +257,7 @@
      * Receive notification of a processing instruction.
      *
      *
  -   * NEEDSDOC @param handler
  +   * @param handler non-null reference to current StylesheetHandler that is 
constructing the Templates.
      * @param target The processing instruction target.
      * @param data The processing instruction data, or null if
      *             none is supplied.
  @@ -274,7 +274,7 @@
      * Receive notification of a skipped entity.
      *
      *
  -   * NEEDSDOC @param handler
  +   * @param handler non-null reference to current StylesheetHandler that is 
constructing the Templates.
      * @param name The name of the skipped entity.
      */
     public void skippedEntity(StylesheetHandler handler, String name)
  
  
  

Reply via email to