You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by cu...@apache.org on 2001/10/10 20:10:14 UTC

cvs commit: xml-xalan/java/src/org/xml/sax/helpers AttributeListImpl.java AttributesImpl.java DefaultHandler.java LocatorImpl.java NamespaceSupport.java ParserAdapter.java ParserFactory.java XMLFilterImpl.java XMLReaderAdapter.java XMLReaderFactory.java package.html

curcuru     01/10/10 11:10:14

  Modified:    java/src/org/xml/sax AttributeList.java Attributes.java
                        ContentHandler.java DTDHandler.java
                        DocumentHandler.java EntityResolver.java
                        ErrorHandler.java HandlerBase.java InputSource.java
                        Locator.java Parser.java SAXException.java
                        SAXNotRecognizedException.java
                        SAXNotSupportedException.java
                        SAXParseException.java XMLFilter.java
                        XMLReader.java package.html
               java/src/org/xml/sax/ext DeclHandler.java
                        LexicalHandler.java package.html
               java/src/org/xml/sax/helpers AttributeListImpl.java
                        AttributesImpl.java DefaultHandler.java
                        LocatorImpl.java NamespaceSupport.java
                        ParserAdapter.java ParserFactory.java
                        XMLFilterImpl.java XMLReaderAdapter.java
                        XMLReaderFactory.java package.html
  Log:
  Checkin xml-commons versions of DOM/JAXP/SAX files to xml-xalan tree;
  previous Xalan copies were tagged 'before-commons'
  
  Revision  Changes    Path
  1.2       +2 -2      xml-xalan/java/src/org/xml/sax/AttributeList.java
  
  Index: AttributeList.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/xml/sax/AttributeList.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AttributeList.java	2000/10/02 02:43:16	1.1
  +++ AttributeList.java	2001/10/10 18:10:12	1.2
  @@ -1,6 +1,6 @@
   // SAX Attribute List Interface.
   // No warranty; no copyright -- use this as you will.
  -// $Id: AttributeList.java,v 1.1 2000/10/02 02:43:16 sboag Exp $
  +// $Id: AttributeList.java,v 1.2 2001/10/10 18:10:12 curcuru Exp $
   
   package org.xml.sax;
   
  @@ -63,7 +63,7 @@
    * @since SAX 1.0
    * @author David Megginson, 
    *         <a href="mailto:sax@megginson.com">sax@megginson.com</a>
  - * @version 2.0
  + * @version 2.0r2pre
    * @see org.xml.sax.DocumentHandler#startElement startElement
    * @see org.xml.sax.helpers.AttributeListImpl AttributeListImpl
    */
  
  
  
  1.2       +3 -3      xml-xalan/java/src/org/xml/sax/Attributes.java
  
  Index: Attributes.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/xml/sax/Attributes.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Attributes.java	2000/10/02 02:43:16	1.1
  +++ Attributes.java	2001/10/10 18:10:12	1.2
  @@ -2,7 +2,7 @@
   // Written by David Megginson, sax@megginson.com
   // NO WARRANTY!  This class is in the public domain.
   
  -// $Id: Attributes.java,v 1.1 2000/10/02 02:43:16 sboag Exp $
  +// $Id: Attributes.java,v 1.2 2001/10/10 18:10:12 curcuru Exp $
   
   
   package org.xml.sax;
  @@ -49,7 +49,7 @@
    * @since SAX 2.0
    * @author David Megginson, 
    *         <a href="mailto:sax@megginson.com">sax@megginson.com</a>
  - * @version 2.0
  + * @version 2.0r2pre
    * @see org.xml.sax.helpers.AttributeListImpl
    */
   public interface Attributes
  @@ -167,7 +167,7 @@
        * @return The index of the attribute, or -1 if it does not
        *         appear in the list.
        */
  -    public int getIndex (String uri, String localPart);
  +    public int getIndex (String uri, String localName);
   
   
       /**
  
  
  
  1.2       +2 -2      xml-xalan/java/src/org/xml/sax/ContentHandler.java
  
  Index: ContentHandler.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/xml/sax/ContentHandler.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ContentHandler.java	2000/10/02 02:43:16	1.1
  +++ ContentHandler.java	2001/10/10 18:10:12	1.2
  @@ -2,7 +2,7 @@
   // Written by David Megginson, sax@megginson.com
   // NO WARRANTY!  This class is in the public domain.
   
  -// $Id: ContentHandler.java,v 1.1 2000/10/02 02:43:16 sboag Exp $
  +// $Id: ContentHandler.java,v 1.2 2001/10/10 18:10:12 curcuru Exp $
   
   package org.xml.sax;
   
  @@ -50,7 +50,7 @@
    * @since SAX 2.0
    * @author David Megginson, 
    *         <a href="mailto:sax@megginson.com">sax@megginson.com</a>
  - * @version 2.0
  + * @version 2.0r2pre
    * @see org.xml.sax.XMLReader
    * @see org.xml.sax.DTDHandler
    * @see org.xml.sax.ErrorHandler
  
  
  
  1.2       +2 -2      xml-xalan/java/src/org/xml/sax/DTDHandler.java
  
  Index: DTDHandler.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/xml/sax/DTDHandler.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DTDHandler.java	2000/10/02 02:43:17	1.1
  +++ DTDHandler.java	2001/10/10 18:10:12	1.2
  @@ -1,6 +1,6 @@
   // SAX DTD handler.
   // No warranty; no copyright -- use this as you will.
  -// $Id: DTDHandler.java,v 1.1 2000/10/02 02:43:17 sboag Exp $
  +// $Id: DTDHandler.java,v 1.2 2001/10/10 18:10:12 curcuru Exp $
   
   package org.xml.sax;
   
  @@ -39,7 +39,7 @@
    * @since SAX 1.0
    * @author David Megginson, 
    *         <a href="mailto:sax@megginson.com">sax@megginson.com</a>
  - * @version 2.0
  + * @version 2.0r2pre
    * @see org.xml.sax.Parser#setDTDHandler
    * @see org.xml.sax.HandlerBase 
    */
  
  
  
  1.2       +2 -2      xml-xalan/java/src/org/xml/sax/DocumentHandler.java
  
  Index: DocumentHandler.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/xml/sax/DocumentHandler.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DocumentHandler.java	2000/10/02 02:43:17	1.1
  +++ DocumentHandler.java	2001/10/10 18:10:12	1.2
  @@ -1,6 +1,6 @@
   // SAX document handler.
   // No warranty; no copyright -- use this as you will.
  -// $Id: DocumentHandler.java,v 1.1 2000/10/02 02:43:17 sboag Exp $
  +// $Id: DocumentHandler.java,v 1.2 2001/10/10 18:10:12 curcuru Exp $
   
   package org.xml.sax;
   
  @@ -37,7 +37,7 @@
    * @since SAX 1.0
    * @author David Megginson, 
    *         <a href="mailto:sax@megginson.com">sax@megginson.com</a>
  - * @version 2.0
  + * @version 2.0r2pre
    * @see org.xml.sax.Parser#setDocumentHandler
    * @see org.xml.sax.Locator
    * @see org.xml.sax.HandlerBase
  
  
  
  1.2       +2 -2      xml-xalan/java/src/org/xml/sax/EntityResolver.java
  
  Index: EntityResolver.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/xml/sax/EntityResolver.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- EntityResolver.java	2000/10/02 02:43:17	1.1
  +++ EntityResolver.java	2001/10/10 18:10:12	1.2
  @@ -1,6 +1,6 @@
   // SAX entity resolver.
   // No warranty; no copyright -- use this as you will.
  -// $Id: EntityResolver.java,v 1.1 2000/10/02 02:43:17 sboag Exp $
  +// $Id: EntityResolver.java,v 1.2 2001/10/10 18:10:12 curcuru Exp $
   
   package org.xml.sax;
   
  @@ -60,7 +60,7 @@
    * @since SAX 1.0
    * @author David Megginson, 
    *         <a href="mailto:sax@megginson.com">sax@megginson.com</a>
  - * @version 2.0
  + * @version 2.0r2pre
    * @see org.xml.sax.Parser#setEntityResolver
    * @see org.xml.sax.InputSource
    */
  
  
  
  1.2       +2 -2      xml-xalan/java/src/org/xml/sax/ErrorHandler.java
  
  Index: ErrorHandler.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/xml/sax/ErrorHandler.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ErrorHandler.java	2000/10/02 02:43:17	1.1
  +++ ErrorHandler.java	2001/10/10 18:10:12	1.2
  @@ -1,6 +1,6 @@
   // SAX error handler.
   // No warranty; no copyright -- use this as you will.
  -// $Id: ErrorHandler.java,v 1.1 2000/10/02 02:43:17 sboag Exp $
  +// $Id: ErrorHandler.java,v 1.2 2001/10/10 18:10:12 curcuru Exp $
   
   package org.xml.sax;
   
  @@ -35,7 +35,7 @@
    * @since SAX 1.0
    * @author David Megginson, 
    *         <a href="mailto:sax@megginson.com">sax@megginson.com</a>
  - * @version 2.0
  + * @version 2.0r2pre
    * @see org.xml.sax.Parser#setErrorHandler
    * @see org.xml.sax.SAXParseException 
    */
  
  
  
  1.2       +2 -2      xml-xalan/java/src/org/xml/sax/HandlerBase.java
  
  Index: HandlerBase.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/xml/sax/HandlerBase.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- HandlerBase.java	2000/10/02 02:43:17	1.1
  +++ HandlerBase.java	2001/10/10 18:10:12	1.2
  @@ -1,6 +1,6 @@
   // SAX default handler base class.
   // No warranty; no copyright -- use this as you will.
  -// $Id: HandlerBase.java,v 1.1 2000/10/02 02:43:17 sboag Exp $
  +// $Id: HandlerBase.java,v 1.2 2001/10/10 18:10:12 curcuru Exp $
   
   package org.xml.sax;
   
  @@ -34,7 +34,7 @@
    * @since SAX 1.0
    * @author David Megginson, 
    *         <a href="mailto:sax@megginson.com">sax@megginson.com</a>
  - * @version 2.0
  + * @version 2.0r2pre
    * @see org.xml.sax.EntityResolver
    * @see org.xml.sax.DTDHandler
    * @see org.xml.sax.DocumentHandler
  
  
  
  1.2       +3 -3      xml-xalan/java/src/org/xml/sax/InputSource.java
  
  Index: InputSource.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/xml/sax/InputSource.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- InputSource.java	2000/10/02 02:43:17	1.1
  +++ InputSource.java	2001/10/10 18:10:12	1.2
  @@ -1,6 +1,6 @@
   // SAX input source.
   // No warranty; no copyright -- use this as you will.
  -// $Id: InputSource.java,v 1.1 2000/10/02 02:43:17 sboag Exp $
  +// $Id: InputSource.java,v 1.2 2001/10/10 18:10:12 curcuru Exp $
   
   package org.xml.sax;
   
  @@ -40,7 +40,7 @@
    * @since SAX 1.0
    * @author David Megginson, 
    *         <a href="mailto:sax@megginson.com">sax@megginson.com</a>
  - * @version 2.0
  + * @version 2.0r2pre
    * @see org.xml.sax.Parser#parse
    * @see org.xml.sax.EntityResolver#resolveEntity
    * @see java.io.InputStream
  @@ -191,7 +191,7 @@
        *
        * <p>If the system ID is a URL, it will be fully resolved.</p>
        *
  -     * @return The system identifier.
  +     * @return The system identifier, or null if none was supplied.
        * @see #setSystemId
        * @see #getEncoding
        */
  
  
  
  1.2       +2 -2      xml-xalan/java/src/org/xml/sax/Locator.java
  
  Index: Locator.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/xml/sax/Locator.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Locator.java	2000/10/02 02:43:17	1.1
  +++ Locator.java	2001/10/10 18:10:12	1.2
  @@ -1,6 +1,6 @@
   // SAX locator interface for document events.
   // No warranty; no copyright -- use this as you will.
  -// $Id: Locator.java,v 1.1 2000/10/02 02:43:17 sboag Exp $
  +// $Id: Locator.java,v 1.2 2001/10/10 18:10:12 curcuru Exp $
   
   package org.xml.sax;
   
  @@ -37,7 +37,7 @@
    * @since SAX 1.0
    * @author David Megginson, 
    *         <a href="mailto:sax@megginson.com">sax@megginson.com</a>
  - * @version 2.0
  + * @version 2.0r2pre
    * @see org.xml.sax.ContentHandler#setDocumentLocator 
    */
   public interface Locator {
  
  
  
  1.2       +2 -2      xml-xalan/java/src/org/xml/sax/Parser.java
  
  Index: Parser.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/xml/sax/Parser.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Parser.java	2000/10/02 02:43:17	1.1
  +++ Parser.java	2001/10/10 18:10:12	1.2
  @@ -1,6 +1,6 @@
   // SAX parser interface.
   // No warranty; no copyright -- use this as you will.
  -// $Id: Parser.java,v 1.1 2000/10/02 02:43:17 sboag Exp $
  +// $Id: Parser.java,v 1.2 2001/10/10 18:10:12 curcuru Exp $
   
   package org.xml.sax;
   
  @@ -39,7 +39,7 @@
    * @since SAX 1.0
    * @author David Megginson, 
    *         <a href="mailto:sax@megginson.com">sax@megginson.com</a>
  - * @version 2.0
  + * @version 2.0r2pre
    * @see org.xml.sax.EntityResolver
    * @see org.xml.sax.DTDHandler
    * @see org.xml.sax.DocumentHandler
  
  
  
  1.2       +12 -2     xml-xalan/java/src/org/xml/sax/SAXException.java
  
  Index: SAXException.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/xml/sax/SAXException.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SAXException.java	2000/10/02 02:43:17	1.1
  +++ SAXException.java	2001/10/10 18:10:12	1.2
  @@ -1,6 +1,6 @@
   // SAX exception class.
   // No warranty; no copyright -- use this as you will.
  -// $Id: SAXException.java,v 1.1 2000/10/02 02:43:17 sboag Exp $
  +// $Id: SAXException.java,v 1.2 2001/10/10 18:10:12 curcuru Exp $
   
   package org.xml.sax;
   
  @@ -29,10 +29,20 @@
    * @since SAX 1.0
    * @author David Megginson, 
    *         <a href="mailto:sax@megginson.com">sax@megginson.com</a>
  - * @version 2.0
  + * @version 2.0r2pre
    * @see org.xml.sax.SAXParseException
    */
   public class SAXException extends Exception {
  +
  +
  +    /**
  +     * Create a new SAXException.
  +     */
  +    public SAXException ()
  +    {
  +	super();
  +	this.exception = null;
  +    }
       
       
       /**
  
  
  
  1.2       +11 -2     xml-xalan/java/src/org/xml/sax/SAXNotRecognizedException.java
  
  Index: SAXNotRecognizedException.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/xml/sax/SAXNotRecognizedException.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SAXNotRecognizedException.java	2000/10/02 02:43:17	1.1
  +++ SAXNotRecognizedException.java	2001/10/10 18:10:12	1.2
  @@ -2,7 +2,7 @@
   // Written by David Megginson, sax@megginson.com
   // NO WARRANTY!  This class is in the Public Domain.
   
  -// $Id: SAXNotRecognizedException.java,v 1.1 2000/10/02 02:43:17 sboag Exp $
  +// $Id: SAXNotRecognizedException.java,v 1.2 2001/10/10 18:10:12 curcuru Exp $
   
   
   package org.xml.sax;
  @@ -23,11 +23,20 @@
    * @since SAX 2.0
    * @author David Megginson, 
    *         <a href="mailto:sax@megginson.com">sax@megginson.com</a>
  - * @version 2.0
  + * @version 2.0r2pre
    * @see org.xml.sax.SAXNotSupportedException
    */
   public class SAXNotRecognizedException extends SAXException
   {
  +
  +    /**
  +     * Default constructor.
  +     */
  +    public SAXNotRecognizedException ()
  +    {
  +	super();
  +    }
  +
   
       /**
        * Construct a new exception with the given message.
  
  
  
  1.2       +11 -2     xml-xalan/java/src/org/xml/sax/SAXNotSupportedException.java
  
  Index: SAXNotSupportedException.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/xml/sax/SAXNotSupportedException.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SAXNotSupportedException.java	2000/10/02 02:43:17	1.1
  +++ SAXNotSupportedException.java	2001/10/10 18:10:12	1.2
  @@ -2,7 +2,7 @@
   // Written by David Megginson, sax@megginson.com
   // NO WARRANTY!  This class is in the Public Domain.
   
  -// $Id: SAXNotSupportedException.java,v 1.1 2000/10/02 02:43:17 sboag Exp $
  +// $Id: SAXNotSupportedException.java,v 1.2 2001/10/10 18:10:12 curcuru Exp $
   
   
   package org.xml.sax;
  @@ -23,11 +23,20 @@
    * @since SAX 2.0
    * @author David Megginson, 
    *         <a href="mailto:sax@megginson.com">sax@megginson.com</a>
  - * @version 2.0
  + * @version 2.0r2pre
    * @see org.xml.sax.SAXNotRecognizedException 
    */
   public class SAXNotSupportedException extends SAXException
   {
  +
  +    /**
  +     * Construct a new exception with no message.
  +     */
  +    public SAXNotSupportedException ()
  +    {
  +	super();
  +    }
  +
   
       /**
        * Construct a new exception with the given message.
  
  
  
  1.2       +2 -2      xml-xalan/java/src/org/xml/sax/SAXParseException.java
  
  Index: SAXParseException.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/xml/sax/SAXParseException.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SAXParseException.java	2000/10/02 02:43:17	1.1
  +++ SAXParseException.java	2001/10/10 18:10:12	1.2
  @@ -1,6 +1,6 @@
   // SAX exception class.
   // No warranty; no copyright -- use this as you will.
  -// $Id: SAXParseException.java,v 1.1 2000/10/02 02:43:17 sboag Exp $
  +// $Id: SAXParseException.java,v 1.2 2001/10/10 18:10:12 curcuru Exp $
   
   package org.xml.sax;
   
  @@ -26,7 +26,7 @@
    * @since SAX 1.0
    * @author David Megginson, 
    *         <a href="mailto:sax@megginson.com">sax@megginson.com</a>
  - * @version 2.0
  + * @version 2.0r2pre
    * @see org.xml.sax.SAXException
    * @see org.xml.sax.Locator
    * @see org.xml.sax.ErrorHandler
  
  
  
  1.2       +2 -2      xml-xalan/java/src/org/xml/sax/XMLFilter.java
  
  Index: XMLFilter.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/xml/sax/XMLFilter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XMLFilter.java	2000/10/02 02:43:17	1.1
  +++ XMLFilter.java	2001/10/10 18:10:12	1.2
  @@ -2,7 +2,7 @@
   // Written by David Megginson, sax@megginson.com
   // NO WARRANTY!  This class is in the Public Domain.
   
  -// $Id: XMLFilter.java,v 1.1 2000/10/02 02:43:17 sboag Exp $
  +// $Id: XMLFilter.java,v 1.2 2001/10/10 18:10:12 curcuru Exp $
   
   
   package org.xml.sax;
  @@ -30,7 +30,7 @@
    * @since SAX 2.0
    * @author David Megginson, 
    *         <a href="mailto:sax@megginson.com">sax@megginson.com</a>
  - * @version 2.0
  + * @version 2.0r2pre
    * @see org.xml.sax.helpers.XMLFilterImpl
    */
   public interface XMLFilter extends XMLReader
  
  
  
  1.2       +2 -2      xml-xalan/java/src/org/xml/sax/XMLReader.java
  
  Index: XMLReader.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/xml/sax/XMLReader.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XMLReader.java	2000/10/02 02:43:17	1.1
  +++ XMLReader.java	2001/10/10 18:10:12	1.2
  @@ -2,7 +2,7 @@
   // Written by David Megginson, sax@megginson.com
   // NO WARRANTY!  This class is in the Public Domain.
   
  -// $Id: XMLReader.java,v 1.1 2000/10/02 02:43:17 sboag Exp $
  +// $Id: XMLReader.java,v 1.2 2001/10/10 18:10:12 curcuru Exp $
   
   package org.xml.sax;
   
  @@ -51,7 +51,7 @@
    * @since SAX 2.0
    * @author David Megginson, 
    *         <a href="mailto:sax@megginson.com">sax@megginson.com</a>
  - * @version 2.0
  + * @version 2.0r2pre
    * @see org.xml.sax.XMLFilter
    * @see org.xml.sax.helpers.ParserAdapter
    * @see org.xml.sax.helpers.XMLReaderAdapter 
  
  
  
  1.2       +21 -6     xml-xalan/java/src/org/xml/sax/package.html
  
  Index: package.html
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/xml/sax/package.html,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- package.html	2000/10/16 16:32:48	1.1
  +++ package.html	2001/10/10 18:10:12	1.2
  @@ -1,8 +1,23 @@
  -<html>
  -  <title>org.w3c.dom Package</title>
  -  <body>
  -    <p>SAX 2.0 interfaces.<p>
  - </body>
  -</html>
  +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  +               "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  +
  +<html xmlns="http://www.w3.org/1999/xhtml">
  +<head>
  +<title>SAX 2.0 r2 prerelease interfaces</title>
  +</head>
  +
  +<body>
  +<h1>SAX 2.0 r2 prerelease interfaces</h1>
   
  +<blockquote>
  +<p class="copyright">This document is in the <strong>PUBLIC
  +DOMAIN</strong> and comes with <strong>NO WARRANTY</strong> of any
  +kind.</p>
  +</blockquote>
   
  +<p>This is a prerelease of a bugfix release for SAX2, the second
  +generation of the Simple API for XML.  For information, see
  +docs/index.html.</p>
  +
  +</body>
  +</html>
  
  
  
  1.2       +20 -10    xml-xalan/java/src/org/xml/sax/ext/DeclHandler.java
  
  Index: DeclHandler.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/xml/sax/ext/DeclHandler.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DeclHandler.java	2000/10/02 02:43:19	1.1
  +++ DeclHandler.java	2001/10/10 18:10:13	1.2
  @@ -1,6 +1,6 @@
   // DeclHandler.java - Optional handler for DTD declaration events.
   // Public Domain: no warranty.
  -// $Id: DeclHandler.java,v 1.1 2000/10/02 02:43:19 sboag Exp $
  +// $Id: DeclHandler.java,v 1.2 2001/10/10 18:10:13 curcuru Exp $
   
   package org.xml.sax.ext;
   
  @@ -17,7 +17,8 @@
    *
    * <p>This is an optional extension handler for SAX2 to provide
    * information about DTD declarations in an XML document.  XML
  - * readers are not required to support this handler.</p>
  + * readers are not required to support this handler, and this
  + * handler is not included in the core SAX2 distribution.</p>
    *
    * <p>Note that data-related DTD declarations (unparsed entities and
    * notations) are already reported through the {@link
  @@ -30,17 +31,17 @@
    *
    * <p>To set the DeclHandler for an XML reader, use the
    * {@link org.xml.sax.XMLReader#setProperty setProperty} method
  - * with the propertyId "http://xml.org/sax/handlers/DeclHandler".
  + * with the propertyId "http://xml.org/sax/properties/declaration-handler".
    * If the reader does not support declaration events, it will throw a
    * {@link org.xml.sax.SAXNotRecognizedException SAXNotRecognizedException}
    * or a
    * {@link org.xml.sax.SAXNotSupportedException SAXNotSupportedException}
    * when you attempt to register the handler.</p>
    *
  - * @since SAX 2.0
  + * @since 1.0
    * @author David Megginson, 
    *         <a href="mailto:sax@megginson.com">sax@megginson.com</a>
  - * @version 2.0beta
  + * @version 1.0
    * @see org.xml.sax.XMLReader
    */
   public interface DeclHandler
  @@ -52,8 +53,11 @@
        * <p>The content model will consist of the string "EMPTY", the
        * string "ANY", or a parenthesised group, optionally followed
        * by an occurrence indicator.  The model will be normalized so
  -     * that all whitespace is removed,and will include the enclosing
  -     * parentheses.</p>
  +     * that all parameter entities are fully resolved and all whitespace 
  +     * is removed,and will include the enclosing parentheses.  Other
  +     * normalization (such as removing redundant parentheses or 
  +     * simplifying occurrence indicators) is at the discretion of the
  +     * parser.</p>
        *
        * @param name The element type name.
        * @param model The content model as a normalized string.
  @@ -69,9 +73,14 @@
        * <p>Only the effective (first) declaration for an attribute will
        * be reported.  The type will be one of the strings "CDATA",
        * "ID", "IDREF", "IDREFS", "NMTOKEN", "NMTOKENS", "ENTITY",
  -     * "ENTITIES", or "NOTATION", or a parenthesized token group with 
  -     * the separator "|" and all whitespace removed.</p>
  +     * "ENTITIES", a parenthesized token group with 
  +     * the separator "|" and all whitespace removed, or the word
  +     * "NOTATION" followed by a space followed by a parenthesized
  +     * token group with all whitespace removed.</p>
        *
  +     * <p>Any parameter entities in the attribute value will be
  +     * expanded, but general entities will not.</p>
  +     *
        * @param eName The name of the associated element.
        * @param aName The name of the attribute.
        * @param type A string representing the attribute type.
  @@ -94,7 +103,8 @@
        * Report an internal entity declaration.
        *
        * <p>Only the effective (first) declaration for each entity
  -     * will be reported.</p>
  +     * will be reported.  All parameter entities in the value
  +     * will be expanded, but general entities will not.</p>
        *
        * @param name The name of the entity.  If it is a parameter
        *        entity, the name will begin with '%'.
  
  
  
  1.2       +71 -21    xml-xalan/java/src/org/xml/sax/ext/LexicalHandler.java
  
  Index: LexicalHandler.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/xml/sax/ext/LexicalHandler.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- LexicalHandler.java	2000/10/02 02:43:20	1.1
  +++ LexicalHandler.java	2001/10/10 18:10:13	1.2
  @@ -1,6 +1,6 @@
   // LexicalHandler.java - optional handler for lexical parse events.
   // Public Domain: no warranty.
  -// $Id: LexicalHandler.java,v 1.1 2000/10/02 02:43:20 sboag Exp $
  +// $Id: LexicalHandler.java,v 1.2 2001/10/10 18:10:13 curcuru Exp $
   
   package org.xml.sax.ext;
   
  @@ -17,7 +17,8 @@
    * <p>This is an optional extension handler for SAX2 to provide
    * lexical information about an XML document, such as comments
    * and CDATA section boundaries; XML readers are not required to 
  - * support this handler.</p>
  + * support this handler, and it is not part of the core SAX2
  + * distribution.</p>
    *
    * <p>The events in the lexical handler apply to the entire document,
    * not just to the document element, and all lexical handler events
  @@ -26,17 +27,17 @@
    *
    * <p>To set the LexicalHandler for an XML reader, use the
    * {@link org.xml.sax.XMLReader#setProperty setProperty} method
  - * with the propertyId "http://xml.org/sax/handlers/LexicalHandler".
  + * with the propertyId "http://xml.org/sax/properties/lexical-handler".
    * If the reader does not support lexical events, it will throw a
    * {@link org.xml.sax.SAXNotRecognizedException SAXNotRecognizedException}
    * or a
    * {@link org.xml.sax.SAXNotSupportedException SAXNotSupportedException}
    * when you attempt to register the handler.</p>
    *
  - * @since SAX 2.0
  + * @since 1.0
    * @author David Megginson, 
    *         <a href="mailto:sax@megginson.com">sax@megginson.com</a>
  - * @version 2.0beta
  + * @version 1.0
    * @see org.xml.sax.XMLReader#setProperty
    * @see org.xml.sax.SAXNotRecognizedException
    * @see org.xml.sax.SAXNotSupportedException
  @@ -47,13 +48,28 @@
       /**
        * Report the start of DTD declarations, if any.
        *
  -     * <p>Any declarations are assumed to be in the internal subset
  -     * unless otherwise indicated by a {@link #startEntity startEntity}
  -     * event.</p>
  +     * <p>This method is intended to report the beginning of the
  +     * DOCTYPE declaration; if the document has no DOCTYPE declaration,
  +     * this method will not be invoked.</p>
  +     *
  +     * <p>All declarations reported through 
  +     * {@link org.xml.sax.DTDHandler DTDHandler} or
  +     * {@link org.xml.sax.ext.DeclHandler DeclHandler} events must appear
  +     * between the startDTD and {@link #endDTD endDTD} events.
  +     * Declarations are assumed to belong to the internal DTD subset
  +     * unless they appear between {@link #startEntity startEntity}
  +     * and {@link #endEntity endEntity} events.  Comments and
  +     * processing instructions from the DTD should also be reported
  +     * between the startDTD and endDTD events, in their original 
  +     * order of (logical) occurrence; they are not required to
  +     * appear in their correct locations relative to DTDHandler
  +     * or DeclHandler events, however.</p>
        *
        * <p>Note that the start/endDTD events will appear within
        * the start/endDocument events from ContentHandler and
  -     * before the first startElement event.</p>
  +     * before the first 
  +     * {@link org.xml.sax.ContentHandler#startElement startElement}
  +     * event.</p>
        *
        * @param name The document type name.
        * @param publicId The declared public identifier for the
  @@ -73,6 +89,10 @@
       /**
        * Report the end of DTD declarations.
        *
  +     * <p>This method is intended to report the end of the
  +     * DOCTYPE declaration; if the document has no DOCTYPE declaration,
  +     * this method will not be invoked.</p>
  +     *
        * @exception SAXException The application may raise an exception.
        * @see #startDTD
        */
  @@ -81,26 +101,53 @@
   
   
       /**
  -     * Report the beginning of an entity in content.
  +     * Report the beginning of some internal and external XML entities.
        *
  -     * <p><strong>NOTE:</entity> entity references in attribute
  -     * values -- and the start and end of the document entity --
  -     * are never reported.</p>
  -     *
  -     * <p>The start and end of the external DTD subset are reported
  -     * using the pseudo-name "[dtd]".  All other events must be
  -     * properly nested within start/end entity events.</p>
  +     * <p>The reporting of parameter entities (including
  +     * the external DTD subset) is optional, and SAX2 drivers that
  +     * support LexicalHandler may not support it; you can use the
  +     * <code
  +     * >http://xml.org/sax/features/lexical-handler/parameter-entities</code>
  +     * feature to query or control the reporting of parameter entities.</p>
  +     *
  +     * <p>General entities are reported with their regular names,
  +     * parameter entities have '%' prepended to their names, and 
  +     * the external DTD subset has the pseudo-entity name "[dtd]".</p>
  +     *
  +     * <p>When a SAX2 driver is providing these events, all other 
  +     * events must be properly nested within start/end entity 
  +     * events.  There is no additional requirement that events from 
  +     * {@link org.xml.sax.ext.DeclHandler DeclHandler} or
  +     * {@link org.xml.sax.DTDHandler DTDHandler} be properly ordered.</p>
        *
        * <p>Note that skipped entities will be reported through the
        * {@link org.xml.sax.ContentHandler#skippedEntity skippedEntity}
        * event, which is part of the ContentHandler interface.</p>
        *
  +     * <p>Because of the streaming event model that SAX uses, some
  +     * entity boundaries cannot be reported under any 
  +     * circumstances:</p>
  +     *
  +     * <ul>
  +     * <li>general entities within attribute values</li>
  +     * <li>parameter entities within declarations</li>
  +     * </ul>
  +     *
  +     * <p>These will be silently expanded, with no indication of where
  +     * the original entity boundaries were.</p>
  +     *
  +     * <p>Note also that the boundaries of character references (which
  +     * are not really entities anyway) are not reported.</p>
  +     *
  +     * <p>All start/endEntity events must be properly nested.
  +     *
        * @param name The name of the entity.  If it is a parameter
  -     *        entity, the name will begin with '%'.
  +     *        entity, the name will begin with '%', and if it is the
  +     *        external DTD subset, it will be "[dtd]".
        * @exception SAXException The application may raise an exception.
        * @see #endEntity
        * @see org.xml.sax.ext.DeclHandler#internalEntityDecl
  -     * @see org.xml.sax.ext.DeclHandler#externalEntityDecl
  +     * @see org.xml.sax.ext.DeclHandler#externalEntityDecl 
        */
       public abstract void startEntity (String name)
   	throws SAXException;
  @@ -122,7 +169,8 @@
        *
        * <p>The contents of the CDATA section will be reported through
        * the regular {@link org.xml.sax.ContentHandler#characters
  -     * characters} event.</p>
  +     * characters} event; this event is intended only to report
  +     * the boundary.</p>
        *
        * @exception SAXException The application may raise an exception.
        * @see #endCDATA
  @@ -146,7 +194,9 @@
        *
        * <p>This callback will be used for comments inside or outside the
        * document element, including comments in the external DTD
  -     * subset (if read).</p>
  +     * subset (if read).  Comments in the DTD must be properly
  +     * nested inside start/endDTD and start/endEntity events (if
  +     * used).</p>
        *
        * @param ch An array holding the characters in the comment.
        * @param start The starting position in the array.
  
  
  
  1.2       +112 -6    xml-xalan/java/src/org/xml/sax/ext/package.html
  
  Index: package.html
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/xml/sax/ext/package.html,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- package.html	2000/10/16 16:32:50	1.1
  +++ package.html	2001/10/10 18:10:13	1.2
  @@ -1,8 +1,114 @@
  -<html>
  -  <title>org.w3c.dom Package</title>
  -  <body>
  -    <p>SAX 2.0 extension handler interfaces.<p>
  - </body>
  -</html>
  +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  +               "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  +
  +<html xmlns="http://www.w3.org/1999/xhtml">
  +<head>
  +<title>SAX2-ext: SAX2 Extension Handlers 1.0</title>
  +</head>
  +
  +<body>
  +<h1>SAX2-ext: SAX2 Extension Handlers 1.0</h1>
  +
  +<blockquote>
  +<p class="copyright">This document is in the <strong>PUBLIC
  +DOMAIN</strong> and comes with <strong>NO WARRANTY</strong> of any
  +kind.</p>
  +</blockquote>
  +
  +<p>This package, SAX2-ext, is an extension package for SAX2.  It is
  +designed both to allow SAX drivers to pass certain types of none-core
  +information to applications and to serve as a simple model for other
  +SAX2 extension packages.</p>
  +
  +<p><strong>NOTE:</strong> this package alone does add any
  +functionality; it simply provides optional interfaces for SAX2 drivers
  +to use.  You must find a SAX2 driver that supports these interfaces if
  +you actually want to have access to lexical and declaration
  +information.</p>
  +
  +<p>The SAX2-ext package currently contains two extension handlers for
  +SAX2:</p>
  +
  +<ol>
  +
  +<li><a href="javadoc/org/xml/sax/ext/LexicalHandler.html"
  +>LexicalHandler</a>, which reports comments, the DOCTYPE declaration,
  +CDATA sections, and (some) entity boundaries; and</li>
  +
  +<li><a href="javadoc/org/xml/sax/ext/DeclHandler.html"
  +>DeclHandler</a>, which reports element, attribute, and entity
  +declarations.</li>
  +
  +</ol>
  +
  +<p>This package is independent of the SAX2 core, and that independence
  +has several consequences:</p>
  +
  +<ul>
  +
  +<li>SAX2 drivers are <em>not</em> required to support these handlers,
  +and you cannot assume that the classes will be present in every SAX2
  +installation.</li>
  +
  +<li>This package may be updated independently of SAX2 (i.e. new
  +handlers may be added without updating SAX2 itself).</li>
  +
  +<li>The handlers are not supported explicitly by the SAX2
  +<var>XMLFilter</var> interface (i.e. events are not passed on by
  +default); you can subclass XMLFilter if you need such behaviour.</li>
   
  +<li>The handlers need to be registered differently than regular SAX2
  +handlers.</li>
   
  +</ul>
  +
  +<p>To set a LexicalHandler, for example, you need to do something like 
  +this:</p>
  +
  +<blockquote><pre xml:space="preserve">
  +LexicalHandler lh = new MyLexicalHandler();
  +try {
  +  xmlReader.setProperty("http://xml.org/sax/properties/lexical-handler",
  +                        lh);
  +} catch (SAXException e) {
  +  System.out.println("LexicalHandler not supported by this SAX2 driver.");
  +}
  +</pre></blockquote>
  +
  +
  +<div>
  +<h2>SAX2-ext Properties</h2>
  +
  +<p>Here is a full definition of the two new SAX2 properties introduced
  +in this version of SAX2-ext:</p>
  +
  +<dl>
  +
  +<dt><code>http://xml.org/sax/properties/lexical-handler</code></dt>
  +<dd><strong>data type:</strong>
  +<code>org.xml.sax.ext.LexicalHandler</code></dd>
  +<dd><strong>description:</strong> An optional extension handler for
  +lexical events like comments.</dd>
  +<dd><strong>access:</strong> read/write</dd>
  +
  +<dt><code>http://xml.org/sax/properties/declaration-handler</code></dt>
  +<dd><strong>data type:</strong>
  +<code>org.xml.sax.ext.DeclHandler</code></dd>
  +<dd><strong>description:</strong> An optional extension handler for
  +DTD-related events other than notations and unparsed entities.</dd>
  +<dd><strong>access:</strong> read/write</dd>
  +
  +</dl>
  +
  +<p><strong>See also:</strong> the package's <a
  +href="javadoc/index.html">JavaDoc</a> documentation.</p>
  +
  +<!-- end of "SAX2-ext Properties" -->
  +</div>
  +
  +<hr />
  +
  +<address>$Id: package.html,v 1.2 2001/10/10 18:10:13 curcuru Exp $</address>
  +
  +</body>
  +</html>
  
  
  
  1.2       +2 -2      xml-xalan/java/src/org/xml/sax/helpers/AttributeListImpl.java
  
  Index: AttributeListImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/xml/sax/helpers/AttributeListImpl.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AttributeListImpl.java	2000/10/02 02:43:20	1.1
  +++ AttributeListImpl.java	2001/10/10 18:10:13	1.2
  @@ -1,6 +1,6 @@
   // SAX default implementation for AttributeList.
   // No warranty; no copyright -- use this as you will.
  -// $Id: AttributeListImpl.java,v 1.1 2000/10/02 02:43:20 sboag Exp $
  +// $Id: AttributeListImpl.java,v 1.2 2001/10/10 18:10:13 curcuru Exp $
   
   package org.xml.sax.helpers;
   
  @@ -57,7 +57,7 @@
    * @since SAX 1.0
    * @author David Megginson, 
    *         <a href="mailto:sax@megginson.com">sax@megginson.com</a>
  - * @version 2.0
  + * @version 2.0r2pre
    * @see org.xml.sax.AttributeList
    * @see org.xml.sax.DocumentHandler#startElement 
    */
  
  
  
  1.3       +36 -29    xml-xalan/java/src/org/xml/sax/helpers/AttributesImpl.java
  
  Index: AttributesImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/xml/sax/helpers/AttributesImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AttributesImpl.java	2001/05/31 16:03:17	1.2
  +++ AttributesImpl.java	2001/10/10 18:10:13	1.3
  @@ -2,7 +2,7 @@
   // Written by David Megginson, sax@megginson.com
   // NO WARRANTY!  This class is in the public domain.
   
  -// $Id: AttributesImpl.java,v 1.2 2001/05/31 16:03:17 garyp Exp $
  +// $Id: AttributesImpl.java,v 1.3 2001/10/10 18:10:13 curcuru Exp $
   
   
   package org.xml.sax.helpers;
  @@ -41,7 +41,7 @@
    * @since SAX 2.0
    * @author David Megginson, 
    *         <a href="mailto:sax@megginson.com">sax@megginson.com</a>
  - * @version 2.0
  + * @version 2.0r2pre
    */
   public class AttributesImpl implements Attributes
   {
  @@ -340,15 +340,17 @@
        */
       public void setAttributes (Attributes atts)
       {
  -	clear();
  -	length = atts.getLength();
  -	data = new String[length*5]; 
  -	for (int i = 0; i < length; i++) {
  -	    data[i*5] = atts.getURI(i);
  -	    data[i*5+1] = atts.getLocalName(i);
  -	    data[i*5+2] = atts.getQName(i);
  -	    data[i*5+3] = atts.getType(i);
  -	    data[i*5+4] = atts.getValue(i);
  +        clear();
  +        length = atts.getLength();
  +        if (length > 0) {
  +            data = new String[length*5];
  +            for (int i = 0; i < length; i++) {
  +                data[i*5] = atts.getURI(i);
  +                data[i*5+1] = atts.getLocalName(i);
  +                data[i*5+2] = atts.getQName(i);
  +                data[i*5+3] = atts.getType(i);
  +                data[i*5+4] = atts.getValue(i);
  +            }
   	}
       }
   
  @@ -556,24 +558,29 @@
        * @param n The minimum number of attributes that the array must
        *        be able to hold.
        */
  -    private void ensureCapacity (int n)
  -    {
  -	if (n > 0 && data == null) {
  -	    data = new String[25];
  -	}
  -
  -	int max = data.length;
  -	if (max >= n * 5) {
  -	    return;
  -	}
  -
  -
  -	while (max < n * 5) {
  -	    max *= 2;
  -	}
  -	String newData[] = new String[max];
  -	System.arraycopy(data, 0, newData, 0, length*5);
  -	data = newData;
  +    private void ensureCapacity (int n)    {
  +        if (n <= 0) {
  +            return;
  +        }
  +        int max;
  +        if (data == null || data.length == 0) {
  +            max = 25;
  +        }
  +        else if (data.length >= n * 5) {
  +            return;
  +        }
  +        else {
  +            max = data.length;
  +        }
  +        while (max < n * 5) {
  +            max *= 2;
  +        }
  +
  +        String newData[] = new String[max];
  +        if (length > 0) {
  +            System.arraycopy(data, 0, newData, 0, length*5);
  +        }
  +        data = newData;
       }
   
   
  
  
  
  1.2       +7 -3      xml-xalan/java/src/org/xml/sax/helpers/DefaultHandler.java
  
  Index: DefaultHandler.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/xml/sax/helpers/DefaultHandler.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DefaultHandler.java	2000/10/02 02:43:20	1.1
  +++ DefaultHandler.java	2001/10/10 18:10:13	1.2
  @@ -2,10 +2,12 @@
   // Written by David Megginson, sax@megginson.com
   // NO WARRANTY!  This class is in the public domain.
   
  -// $Id: DefaultHandler.java,v 1.1 2000/10/02 02:43:20 sboag Exp $
  +// $Id: DefaultHandler.java,v 1.2 2001/10/10 18:10:13 curcuru Exp $
   
   package org.xml.sax.helpers;
   
  +import java.io.IOException;
  +
   import org.xml.sax.InputSource;
   import org.xml.sax.Locator;
   import org.xml.sax.Attributes;
  @@ -47,7 +49,7 @@
    * @since SAX 2.0
    * @author David Megginson, 
    *         <a href="mailto:sax@megginson.com">sax@megginson.com</a>
  - * @version 2.0
  + * @version 2.0r2pre
    * @see org.xml.sax.EntityResolver
    * @see org.xml.sax.DTDHandler
    * @see org.xml.sax.ContentHandler
  @@ -77,12 +79,14 @@
        *                 document.
        * @return The new input source, or null to require the
        *         default behaviour.
  +     * @exception java.io.IOException If there is an error setting
  +     *            up the new input source.
        * @exception org.xml.sax.SAXException Any SAX exception, possibly
        *            wrapping another exception.
        * @see org.xml.sax.EntityResolver#resolveEntity
        */
       public InputSource resolveEntity (String publicId, String systemId)
  -	throws SAXException
  +	throws IOException, SAXException
       {
   	return null;
       }
  
  
  
  1.2       +2 -2      xml-xalan/java/src/org/xml/sax/helpers/LocatorImpl.java
  
  Index: LocatorImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/xml/sax/helpers/LocatorImpl.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- LocatorImpl.java	2000/10/02 02:43:20	1.1
  +++ LocatorImpl.java	2001/10/10 18:10:13	1.2
  @@ -1,6 +1,6 @@
   // SAX default implementation for Locator.
   // No warranty; no copyright -- use this as you will.
  -// $Id: LocatorImpl.java,v 1.1 2000/10/02 02:43:20 sboag Exp $
  +// $Id: LocatorImpl.java,v 1.2 2001/10/10 18:10:13 curcuru Exp $
   
   package org.xml.sax.helpers;
   
  @@ -44,7 +44,7 @@
    * @since SAX 1.0
    * @author David Megginson, 
    *         <a href="mailto:sax@megginson.com">sax@megginson.com</a>
  - * @version 2.0
  + * @version 2.0r2pre
    * @see org.xml.sax.Locator Locator
    */
   public class LocatorImpl implements Locator
  
  
  
  1.2       +2 -2      xml-xalan/java/src/org/xml/sax/helpers/NamespaceSupport.java
  
  Index: NamespaceSupport.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/xml/sax/helpers/NamespaceSupport.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- NamespaceSupport.java	2000/10/02 02:43:20	1.1
  +++ NamespaceSupport.java	2001/10/10 18:10:13	1.2
  @@ -2,7 +2,7 @@
   // Written by David Megginson, sax@megginson.com
   // This class is in the Public Domain.  NO WARRANTY!
   
  -// $Id: NamespaceSupport.java,v 1.1 2000/10/02 02:43:20 sboag Exp $
  +// $Id: NamespaceSupport.java,v 1.2 2001/10/10 18:10:13 curcuru Exp $
   
   package org.xml.sax.helpers;
   
  @@ -60,7 +60,7 @@
    * @since SAX 2.0
    * @author David Megginson, 
    *         <a href="mailto:sax@megginson.com">sax@megginson.com</a>
  - * @version 2.0
  + * @version 2.0r2pre
    */
   public class NamespaceSupport
   {
  
  
  
  1.2       +42 -15    xml-xalan/java/src/org/xml/sax/helpers/ParserAdapter.java
  
  Index: ParserAdapter.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/xml/sax/helpers/ParserAdapter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ParserAdapter.java	2000/10/02 02:43:20	1.1
  +++ ParserAdapter.java	2001/10/10 18:10:13	1.2
  @@ -2,12 +2,13 @@
   // Written by David Megginson, sax@megginson.com
   // NO WARRANTY!  This class is in the public domain.
   
  -// $Id: ParserAdapter.java,v 1.1 2000/10/02 02:43:20 sboag Exp $
  +// $Id: ParserAdapter.java,v 1.2 2001/10/10 18:10:13 curcuru Exp $
   
   package org.xml.sax.helpers;
   
   import java.io.IOException;
   import java.util.Enumeration;
  +import java.util.Vector;
   
   import org.xml.sax.Parser;	// deprecated
   import org.xml.sax.InputSource;
  @@ -47,7 +48,7 @@
    * @since SAX 2.0
    * @author David Megginson, 
    *         <a href="mailto:sax@megginson.com">sax@megginson.com</a>
  - * @version 2.0
  + * @version 2.0r2pre
    * @see org.xml.sax.helpers.XMLReaderAdapter
    * @see org.xml.sax.XMLReader
    * @see org.xml.sax.Parser
  @@ -499,6 +500,12 @@
       public void startElement (String qName, AttributeList qAtts)
   	throws SAXException
       {
  +				// These are exceptions from the
  +				// first pass; they should be
  +				// ignored if there's a second pass,
  +				// but reported otherwise.
  +	Vector exceptions = null;
  +
   				// If we're not doing Namespace
   				// processing, dispatch this quickly.
   	if (!namespaces) {
  @@ -551,9 +558,16 @@
   
   				// This isn't a declaration.
   	    } else {
  -		String attName[] = processName(attQName, true);
  -		atts.addAttribute(attName[0], attName[1], attName[2],
  -				  type, value);
  +		try {
  +		    String attName[] = processName(attQName, true, true);
  +		    atts.addAttribute(attName[0], attName[1], attName[2],
  +				      type, value);
  +		} catch (SAXException e) {
  +		    if (exceptions == null)
  +			exceptions = new Vector();
  +		    exceptions.add(e);
  +		    atts.addAttribute("", attQName, attQName, type, value);
  +		}
   	    }
   	}
   	
  @@ -567,16 +581,19 @@
   	    for (int i = 0; i < length; i++) {
   		String attQName = atts.getQName(i);
   		if (!attQName.startsWith("xmlns")) {
  -		    String attName[] = processName(attQName, true);
  +		    String attName[] = processName(attQName, true, false);
   		    atts.setURI(i, attName[0]);
   		    atts.setLocalName(i, attName[1]);
   		}
   	    }
  +	} else if (exceptions != null && errorHandler != null) {
  +	    for (int i = 0; i < exceptions.size(); i++)
  +		errorHandler.error((SAXParseException)(exceptions.get(i)));
   	}
   
   				// OK, finally report the event.
   	if (contentHandler != null) {
  -	    String name[] = processName(qName, false);
  +	    String name[] = processName(qName, false, false);
   	    contentHandler.startElement(name[0], name[1], name[2], atts);
   	}
       }
  @@ -603,7 +620,7 @@
   	}
   
   				// Split the name.
  -	String names[] = processName(qName, false);
  +	String names[] = processName(qName, false, false);
   	if (contentHandler != null) {
   	    contentHandler.endElement(names[0], names[1], names[2]);
   	    Enumeration prefixes = nsSupport.getDeclaredPrefixes();
  @@ -712,7 +729,8 @@
        * @exception org.xml.sax.SAXException The client may throw
        *            an exception if there is an error callback.
        */
  -    private String [] processName (String qName, boolean isAttribute)
  +    private String [] processName (String qName, boolean isAttribute,
  +				   boolean useException)
   	throws SAXException
       {
   	String parts[] = nsSupport.processName(qName, nameParts,
  @@ -720,6 +738,8 @@
   	if (parts == null) {
   	    parts = new String[3];
   	    parts[2] = qName.intern();
  +	    if (useException)
  +		throw makeException("Undeclared prefix: " + qName);
   	    reportError("Undeclared prefix: " + qName);
   	}
   	return parts;
  @@ -736,17 +756,24 @@
       void reportError (String message)
   	throws SAXException
       {
  -	if (errorHandler == null) {
  -	    return;
  -	}
  +	if (errorHandler != null)
  +	    errorHandler.error(makeException(message));
  +    }
   
  +    
  +    /**
  +     * Construct an exception for the current context.
  +     *
  +     * @param message The error message.
  +     */
  +    private SAXParseException makeException (String message)
  +    {
   	SAXParseException e;
   	if (locator != null) {
  -	    e = new SAXParseException(message, locator);
  +	    return new SAXParseException(message, locator);
   	} else {
  -	    e = new SAXParseException(message, null, null, -1, -1);
  +	    return new SAXParseException(message, null, null, -1, -1);
   	}
  -	errorHandler.error(e);
       }
   
   
  
  
  
  1.2       +2 -2      xml-xalan/java/src/org/xml/sax/helpers/ParserFactory.java
  
  Index: ParserFactory.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/xml/sax/helpers/ParserFactory.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ParserFactory.java	2000/10/02 02:43:20	1.1
  +++ ParserFactory.java	2001/10/10 18:10:13	1.2
  @@ -1,6 +1,6 @@
   // SAX parser factory.
   // No warranty; no copyright -- use this as you will.
  -// $Id: ParserFactory.java,v 1.1 2000/10/02 02:43:20 sboag Exp $
  +// $Id: ParserFactory.java,v 1.2 2001/10/10 18:10:13 curcuru Exp $
   
   package org.xml.sax.helpers;
   
  @@ -42,7 +42,7 @@
    * @since SAX 1.0
    * @author David Megginson, 
    *         <a href="mailto:sax@megginson.com">sax@megginson.com</a>
  - * @version 2.0
  + * @version 2.0r2pre
    * @see org.xml.sax.Parser
    * @see java.lang.Class
    */
  
  
  
  1.2       +2 -2      xml-xalan/java/src/org/xml/sax/helpers/XMLFilterImpl.java
  
  Index: XMLFilterImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/xml/sax/helpers/XMLFilterImpl.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XMLFilterImpl.java	2000/10/02 02:43:20	1.1
  +++ XMLFilterImpl.java	2001/10/10 18:10:13	1.2
  @@ -2,7 +2,7 @@
   // Written by David Megginson, sax@megginson.com
   // NO WARRANTY!  This class is in the Public Domain.
   
  -// $Id: XMLFilterImpl.java,v 1.1 2000/10/02 02:43:20 sboag Exp $
  +// $Id: XMLFilterImpl.java,v 1.2 2001/10/10 18:10:13 curcuru Exp $
   
   package org.xml.sax.helpers;
   
  @@ -41,7 +41,7 @@
    * @since SAX 2.0
    * @author David Megginson, 
    *         <a href="mailto:sax@megginson.com">sax@megginson.com</a>
  - * @version 2.0
  + * @version 2.0r2pre
    * @see org.xml.sax.XMLFilter
    * @see org.xml.sax.XMLReader
    * @see org.xml.sax.EntityResolver
  
  
  
  1.2       +20 -11    xml-xalan/java/src/org/xml/sax/helpers/XMLReaderAdapter.java
  
  Index: XMLReaderAdapter.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/xml/sax/helpers/XMLReaderAdapter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XMLReaderAdapter.java	2000/10/02 02:43:20	1.1
  +++ XMLReaderAdapter.java	2001/10/10 18:10:13	1.2
  @@ -2,7 +2,7 @@
   // Written by David Megginson, sax@megginson.com
   // NO WARRANTY!  This class is in the public domain.
   
  -// $Id: XMLReaderAdapter.java,v 1.1 2000/10/02 02:43:20 sboag Exp $
  +// $Id: XMLReaderAdapter.java,v 1.2 2001/10/10 18:10:13 curcuru Exp $
   
   package org.xml.sax.helpers;
   
  @@ -44,7 +44,7 @@
    * @since SAX 2.0
    * @author David Megginson, 
    *         <a href="mailto:sax@megginson.com">sax@megginson.com</a>
  - * @version 2.0
  + * @version 2.0r2pre
    * @see org.xml.sax.Parser
    * @see org.xml.sax.XMLReader
    */
  @@ -255,7 +255,8 @@
        */
       public void setDocumentLocator (Locator locator)
       {
  -	documentHandler.setDocumentLocator(locator);
  +	if (documentHandler != null)
  +	    documentHandler.setDocumentLocator(locator);
       }
   
   
  @@ -269,7 +270,8 @@
       public void startDocument ()
   	throws SAXException
       {
  -	documentHandler.startDocument();
  +	if (documentHandler != null)
  +	    documentHandler.startDocument();
       }
   
   
  @@ -283,7 +285,8 @@
       public void endDocument ()
   	throws SAXException
       {
  -	documentHandler.endDocument();
  +	if (documentHandler != null)
  +	    documentHandler.endDocument();
       }
   
   
  @@ -325,8 +328,10 @@
   			      String qName, Attributes atts)
   	throws SAXException
       {
  -	qAtts.setAttributes(atts);
  -	documentHandler.startElement(qName, qAtts);
  +	if (documentHandler != null) {
  +	    qAtts.setAttributes(atts);
  +	    documentHandler.startElement(qName, qAtts);
  +	}
       }
   
   
  @@ -344,7 +349,8 @@
   			    String qName)
   	throws SAXException
       {
  -	documentHandler.endElement(qName);
  +	if (documentHandler != null)
  +	    documentHandler.endElement(qName);
       }
   
   
  @@ -361,7 +367,8 @@
       public void characters (char ch[], int start, int length)
   	throws SAXException
       {
  -	documentHandler.characters(ch, start, length);
  +	if (documentHandler != null)
  +	    documentHandler.characters(ch, start, length);
       }
   
   
  @@ -378,7 +385,8 @@
       public void ignorableWhitespace (char ch[], int start, int length)
   	throws SAXException
       {
  -	documentHandler.ignorableWhitespace(ch, start, length);
  +	if (documentHandler != null)
  +	    documentHandler.ignorableWhitespace(ch, start, length);
       }
   
   
  @@ -394,7 +402,8 @@
       public void processingInstruction (String target, String data)
   	throws SAXException
       {
  -	documentHandler.processingInstruction(target, data);
  +	if (documentHandler != null)
  +	    documentHandler.processingInstruction(target, data);
       }
   
   
  
  
  
  1.2       +4 -4      xml-xalan/java/src/org/xml/sax/helpers/XMLReaderFactory.java
  
  Index: XMLReaderFactory.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/xml/sax/helpers/XMLReaderFactory.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XMLReaderFactory.java	2000/10/02 02:43:20	1.1
  +++ XMLReaderFactory.java	2001/10/10 18:10:13	1.2
  @@ -2,7 +2,7 @@
   // Written by David Megginson, sax@megginson.com
   // NO WARRANTY!  This class is in the Public Domain.
   
  -// $Id: XMLReaderFactory.java,v 1.1 2000/10/02 02:43:20 sboag Exp $
  +// $Id: XMLReaderFactory.java,v 1.2 2001/10/10 18:10:13 curcuru Exp $
   
   package org.xml.sax.helpers;
   import org.xml.sax.Parser;
  @@ -42,7 +42,7 @@
    * @since SAX 2.0
    * @author David Megginson, 
    *         <a href="mailto:sax@megginson.com">sax@megginson.com</a>
  - * @version 2.0
  + * @version 2.0r2pre
    * @see org.xml.sax.XMLReader
    */
   final public class XMLReaderFactory
  @@ -75,7 +75,7 @@
        *            or if the class cannot be loaded and instantiated.
        * @see #createXMLReader(java.lang.String)
        */
  -    public static XMLReader createXMLReader ()
  +    public static synchronized XMLReader createXMLReader ()
   	throws SAXException
       {
   	String className = System.getProperty("org.xml.sax.driver");
  @@ -109,7 +109,7 @@
        *            loaded, instantiated, and cast to XMLReader.
        * @see #createXMLReader()
        */
  -    public static XMLReader createXMLReader (String className)
  +    public static synchronized XMLReader createXMLReader (String className)
   	throws SAXException
       {
   	try {
  
  
  
  1.2       +21 -6     xml-xalan/java/src/org/xml/sax/helpers/package.html
  
  Index: package.html
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/xml/sax/helpers/package.html,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- package.html	2000/10/16 16:32:52	1.1
  +++ package.html	2001/10/10 18:10:13	1.2
  @@ -1,8 +1,23 @@
  -<html>
  -  <title>org.w3c.dom Package</title>
  -  <body>
  -    <p>SAX 2.0 implementation classes.<p>
  - </body>
  -</html>
  +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  +               "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  +
  +<html xmlns="http://www.w3.org/1999/xhtml">
  +<head>
  +<title>SAX 2.0 r2 prerelease helper interfaces</title>
  +</head>
  +
  +<body>
  +<h1>SAX 2.0 r2 prerelease helper interfaces</h1>
   
  +<blockquote>
  +<p class="copyright">This document is in the <strong>PUBLIC
  +DOMAIN</strong> and comes with <strong>NO WARRANTY</strong> of any
  +kind.</p>
  +</blockquote>
   
  +<p>This is a prerelease of a bugfix release for SAX2, the second
  +generation of the Simple API for XML.  For information, see
  +docs/index.html.</p>
  +
  +</body>
  +</html>
  
  
  

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