xml-commons-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edwi...@apache.org
Subject cvs commit: xml-commons/java/external/src/javax/xml/transform/stream StreamResult.java StreamSource.java
Date Thu, 28 Jun 2001 23:12:35 GMT
edwingo     01/06/28 16:12:34

  Modified:    java/external/src/javax/xml/parsers SAXParser.java
                        SAXParserFactory.java
               java/external/src/javax/xml/transform
                        TransformerException.java
               java/external/src/javax/xml/transform/stream
                        StreamResult.java StreamSource.java
  Log:
  Updates in javax.xml.{parsers, transform} for JAXP (Reference
  Implementation) RI version 1.1.1.
  Javadoc fixes to SAXParser and SAXParserFactory.
  Misc bug fixes to javax.xml.transform classes.
  
  Revision  Changes    Path
  1.3       +20 -12    xml-commons/java/external/src/javax/xml/parsers/SAXParser.java
  
  Index: SAXParser.java
  ===================================================================
  RCS file: /home/cvs/xml-commons/java/external/src/javax/xml/parsers/SAXParser.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SAXParser.java	2001/05/22 17:00:33	1.2
  +++ SAXParser.java	2001/06/28 23:12:24	1.3
  @@ -84,16 +84,7 @@
    * a variety of input sources. These input sources are InputStreams,
    * Files, URLs, and SAX InputSources.<p>
    *
  - * This static method creates a new factory instance based
  - * on a system property setting or uses the platform default
  - * if no property has been defined.<p>
    *
  - * The system property that controls which Factory implementation
  - * to create is named <code>&quot;javax.xml.parsers.SAXParserFactory&quot;</code>.
  - * This property names a class that is a concrete subclass of this
  - * abstract class. If no property is defined, a platform default
  - * will be used.</p>
  - *
    * As the content is parsed by the underlying parser, methods of the
    * given {@link org.xml.sax.HandlerBase} or the
    * {@link org.xml.sax.helpers.DefaultHandler} are called.<p>
  @@ -130,6 +121,8 @@
        * @param hb The SAX HandlerBase to use.
        * @exception IOException If any IO errors occur.
        * @exception IllegalArgumentException If the given InputStream is null.
  +     * @exception SAXException If the underlying parser throws a
  +     * SAXException while parsing.
        * @see org.xml.sax.DocumentHandler
        */
       
  @@ -155,6 +148,8 @@
        * @param systemId The systemId which is needed for resolving relative URIs.
        * @exception IOException If any IO errors occur.
        * @exception IllegalArgumentException If the given InputStream is null.
  +     * @exception SAXException If the underlying parser throws a
  +     * SAXException while parsing.
        * @see org.xml.sax.DocumentHandler
        * version of this method instead.
        */
  @@ -180,6 +175,8 @@
        * @param dh The SAX DefaultHandler to use.
        * @exception IOException If any IO errors occur.
        * @exception IllegalArgumentException If the given InputStream is null.
  +     * @exception SAXException If the underlying parser throws a
  +     * SAXException while parsing.
        * @see org.xml.sax.DocumentHandler
        */
       
  @@ -204,6 +201,8 @@
        * @param systemId The systemId which is needed for resolving relative URIs.
        * @exception IOException If any IO errors occur.
        * @exception IllegalArgumentException If the given InputStream is null.
  +     * @exception SAXException If the underlying parser throws a
  +     * SAXException while parsing.
        * @see org.xml.sax.DocumentHandler
        * version of this method instead.
        */
  @@ -231,6 +230,8 @@
        * @param hb The SAX HandlerBase to use.
        * @exception IOException If any IO errors occur.
        * @exception IllegalArgumentException If the uri is null.
  +     * @exception SAXException If the underlying parser throws a
  +     * SAXException while parsing.
        * @see org.xml.sax.DocumentHandler
        */
       
  @@ -254,6 +255,8 @@
        * @param dh The SAX DefaultHandler to use.
        * @exception IOException If any IO errors occur.
        * @exception IllegalArgumentException If the uri is null.
  +     * @exception SAXException If the underlying parser throws a
  +     * SAXException while parsing.
        * @see org.xml.sax.DocumentHandler
        */
       
  @@ -279,6 +282,8 @@
        * @exception IOException If any IO errors occur.
        * @exception IllegalArgumentException If the File object is null.
        * @see org.xml.sax.DocumentHandler
  +     * @exception SAXException If the underlying parser throws a
  +     * SAXException while parsing.
        */
   
       public void parse(File f, HandlerBase hb)
  @@ -304,6 +309,8 @@
        * @param dh The SAX DefaultHandler to use.
        * @exception IOException If any IO errors occur.
        * @exception IllegalArgumentException If the File object is null.
  +     * @exception SAXException If the underlying parser throws a
  +     * SAXException while parsing.
        * @see org.xml.sax.DocumentHandler
        */
   
  @@ -333,6 +340,8 @@
        * @param hb The SAX HandlerBase to use.
        * @exception IOException If any IO errors occur.
        * @exception IllegalArgumentException If the InputSource is null.
  +     * @exception SAXException If the underlying parser throws a
  +     * SAXException while parsing.
        * @see org.xml.sax.DocumentHandler
        */
       
  @@ -362,6 +371,8 @@
        * @param dh The SAX DefaultHandler to use.
        * @exception IOException If any IO errors occur.
        * @exception IllegalArgumentException If the InputSource is null.
  +     * @exception SAXException If the underlying parser throws a
  +     * SAXException while parsing.
        * @see org.xml.sax.DocumentHandler
        */
       
  @@ -461,7 +472,4 @@
        */
       public abstract Object getProperty(String name)
           throws SAXNotRecognizedException, SAXNotSupportedException;
  -
  -
  -
   }
  
  
  
  1.3       +4 -0      xml-commons/java/external/src/javax/xml/parsers/SAXParserFactory.java
  
  Index: SAXParserFactory.java
  ===================================================================
  RCS file: /home/cvs/xml-commons/java/external/src/javax/xml/parsers/SAXParserFactory.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SAXParserFactory.java	2001/05/22 17:00:37	1.2
  +++ SAXParserFactory.java	2001/06/28 23:12:25	1.3
  @@ -71,6 +71,10 @@
    * An application can use the same instance of the factory to obtain one or 
    * more instances of the <code>SAXParser</code> provided the instance
    * of the factory isn't being used in more than one thread at a time.
  + * <p>
  + *
  + * The static <code>newInstance</code> method returns a new concrete 
  + * implementation of this class.
    *
    * @since JAXP 1.0
    * @version 1.0
  
  
  
  1.3       +1 -2      xml-commons/java/external/src/javax/xml/transform/TransformerException.java
  
  Index: TransformerException.java
  ===================================================================
  RCS file: /home/cvs/xml-commons/java/external/src/javax/xml/transform/TransformerException.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TransformerException.java	2001/05/22 17:02:14	1.2
  +++ TransformerException.java	2001/06/28 23:12:29	1.3
  @@ -336,7 +336,6 @@
        * @param s The writer where the dump will be sent to.
        */
       public void printStackTrace(java.io.PrintWriter s) {
  -
           if (s == null) {
               s = new java.io.PrintWriter(System.err, true);
           }
  @@ -347,7 +346,6 @@
               if (null != locInfo) {
                   s.println(locInfo);
               }
  -
               super.printStackTrace(s);
           } catch (Throwable e) {}
   
  @@ -396,5 +394,6 @@
                   exception = null;
               }
           }
  +	s.flush();
       }
   }
  
  
  
  1.3       +8 -1      xml-commons/java/external/src/javax/xml/transform/stream/StreamResult.java
  
  Index: StreamResult.java
  ===================================================================
  RCS file: /home/cvs/xml-commons/java/external/src/javax/xml/transform/stream/StreamResult.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- StreamResult.java	2001/05/22 17:05:38	1.2
  +++ StreamResult.java	2001/06/28 23:12:31	1.3
  @@ -188,7 +188,14 @@
        * @param f Must a non-null File reference.
        */
       public void setSystemId(File f) {
  -        this.systemId = "file:///" + f.getAbsolutePath();
  +        String fpath=f.getAbsolutePath();
  +	if (File.separatorChar != '/') {
  +	    fpath = fpath.replace(File.separatorChar, '/');
  +	}
  +        if( fpath.startsWith("/"))
  +	  this.systemId= "file://" + fpath;
  +	else
  +	  this.systemId = "file:///" + fpath;
       }
   
       /**
  
  
  
  1.3       +9 -2      xml-commons/java/external/src/javax/xml/transform/stream/StreamSource.java
  
  Index: StreamSource.java
  ===================================================================
  RCS file: /home/cvs/xml-commons/java/external/src/javax/xml/transform/stream/StreamSource.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- StreamSource.java	2001/05/22 17:05:45	1.2
  +++ StreamSource.java	2001/06/28 23:12:32	1.3
  @@ -160,7 +160,7 @@
        * @param f Must a non-null File reference.
        */
       public StreamSource(File f) {
  -        this.systemId = "file:///" + f.getAbsolutePath();
  +        setSystemId(f);
       }
   
       /**
  @@ -268,7 +268,14 @@
        * @param f Must a non-null File reference.
        */
       public void setSystemId(File f) {
  -        this.systemId = "file:///" + f.toString();
  +	String fpath=f.getAbsolutePath();
  +	if (File.separatorChar != '/') {
  +	    fpath = fpath.replace(File.separatorChar, '/');
  +	}
  +        if( fpath.startsWith("/"))
  +	  this.systemId= "file://" + fpath;
  +	else
  +	  this.systemId = "file:///" + fpath;
       }
   
       //////////////////////////////////////////////////////////////////////
  
  
  

Mime
View raw message