cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@locus.apache.org
Subject cvs commit: xml-cocoon/src/org/apache/cocoon/xml/util DOMBuilder.java DOMStreamer.java
Date Sun, 27 Feb 2000 17:50:09 GMT
pier        00/02/27 09:50:09

  Modified:    src/org/apache/cocoon/xml/util Tag: xml-cocoon2
                        DOMBuilder.java DOMStreamer.java
  Log:
  [Cocoon 2.0] Slightly modified DOM support to better access from filters.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.3   +21 -4     xml-cocoon/src/org/apache/cocoon/xml/util/Attic/DOMBuilder.java
  
  Index: DOMBuilder.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/xml/util/Attic/DOMBuilder.java,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- DOMBuilder.java	2000/02/27 01:33:12	1.1.2.2
  +++ DOMBuilder.java	2000/02/27 17:50:07	1.1.2.3
  @@ -32,7 +32,7 @@
    *
    * @author <a href="mailto:fumagalli@exoffice.com">Pierpaolo Fumagalli</a>
    *         (Apache Software Foundation, Exoffice Technologies)
  - * @version CVS $Revision: 1.1.2.2 $ $Date: 2000/02/27 01:33:12 $
  + * @version CVS $Revision: 1.1.2.3 $ $Date: 2000/02/27 17:50:07 $
    */
   public class DOMBuilder implements XMLConsumer {
       /** The document was not started */
  @@ -56,8 +56,6 @@
       private Locator locator=null;
       /** The listener */
       private Listener listener=null;
  -    /** The document factory */
  -    private DOMFactory factory=null;
       /** The namespaces table */
       private NamespacesTable namespaces=null;
       /** The current document */
  @@ -69,6 +67,16 @@
       /** The vector of namespaces declarations to include in the next element */
       private Vector undecl=new Vector();
   
  +    /** The document factory */
  +    protected DOMFactory factory=null;
  +
  +    /**
  +     * Construct a new instance of this TreeGenerator.
  +     */
  +    protected DOMBuilder() {
  +        this(null,null);
  +    }
  +
       /**
        * Construct a new instance of this TreeGenerator.
        */
  @@ -136,7 +144,7 @@
           // Do a state change and reset the DTD flag
           state=S_AVAIL;
           // Notify the listener
  -        if (this.listener!=null) this.listener.notify(this.document);
  +        this.notify(this.document);
       }
   
       /**
  @@ -516,6 +524,14 @@
           this.current.appendChild(eref);
       }
   
  +    /**
  +     * Receive notification of a successfully completed DOM tree generation.
  +     */
  +    protected void notify(Document doc)
  +    throws SAXException {
  +        if (this.listener!=null) this.listener.notify(this.document);
  +    }
  +
       /** Create a location string */
       private String location() {
           if (this.locator==null) return("");
  @@ -536,6 +552,7 @@
        * be notified of a successful DOM tree generation.
        */
       public static interface Listener {
  +    
           /**
            * Receive notification of a successfully completed DOM tree generation.
            */
  
  
  
  1.1.2.3   +2 -2      xml-cocoon/src/org/apache/cocoon/xml/util/Attic/DOMStreamer.java
  
  Index: DOMStreamer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/xml/util/Attic/DOMStreamer.java,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- DOMStreamer.java	2000/02/27 01:33:12	1.1.2.2
  +++ DOMStreamer.java	2000/02/27 17:50:08	1.1.2.3
  @@ -33,7 +33,7 @@
    *
    * @author <a href="mailto:fumagalli@exoffice.com">Pierpaolo Fumagalli</a>
    *         (Apache Software Foundation, Exoffice Technologies)
  - * @version CVS $Revision: 1.1.2.2 $ $Date: 2000/02/27 01:33:12 $
  + * @version CVS $Revision: 1.1.2.3 $ $Date: 2000/02/27 17:50:08 $
    */
   public class DOMStreamer extends AbstractXMLProducer {
   
  @@ -77,7 +77,7 @@
       /**
        * Start the production of SAX events.
        */
  -    public void produce(Document document)
  +    public void stream(Document document)
       throws SAXException {
           processNode(document);
       }
  
  
  

Mime
View raw message