You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by di...@apache.org on 2001/04/30 19:57:34 UTC

cvs commit: xml-cocoon/src/org/apache/cocoon/xml/dom DOMBuilder.java

dims        01/04/30 10:57:33

  Modified:    src/org/apache/cocoon/xml/dom Tag: xml-cocoon2
                        DOMBuilder.java
  Added:       src/org/apache/cocoon/xml Tag: xml-cocoon2
                        AbstractDOMFragment.java AbstractSAXFragment.java
  Log:
  XMLFragment helper implementations - Patch from Sylvain.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.1   +69 -0     xml-cocoon/src/org/apache/cocoon/xml/Attic/AbstractDOMFragment.java
  
  
  
  
  1.1.2.1   +37 -0     xml-cocoon/src/org/apache/cocoon/xml/Attic/AbstractSAXFragment.java
  
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.14  +19 -2     xml-cocoon/src/org/apache/cocoon/xml/dom/Attic/DOMBuilder.java
  
  Index: DOMBuilder.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/xml/dom/Attic/DOMBuilder.java,v
  retrieving revision 1.1.2.13
  retrieving revision 1.1.2.14
  diff -u -r1.1.2.13 -r1.1.2.14
  --- DOMBuilder.java	2001/04/30 14:17:47	1.1.2.13
  +++ DOMBuilder.java	2001/04/30 17:57:30	1.1.2.14
  @@ -36,7 +36,7 @@
    *
    * @author <a href="mailto:fumagalli@exoffice.com">Pierpaolo Fumagalli</a>
    *         (Apache Software Foundation, Exoffice Technologies)
  - * @version CVS $Revision: 1.1.2.13 $ $Date: 2001/04/30 14:17:47 $
  + * @version CVS $Revision: 1.1.2.14 $ $Date: 2001/04/30 17:57:30 $
    */
   public class DOMBuilder implements XMLConsumer, Loggable {
       protected Logger log;
  @@ -105,7 +105,24 @@
       }
   
       /**
  -     * Return the newly built Document.
  +     * Constructs a new instance that appends nodes to the given parent node.<br/>
  +     * Note : you cannot use a <code>Listener<code> when appending to a
  +     * <code>Node</code>, because the notification occurs at <code>endDocument()</code>
  +     * which does not happen here.
  +     */
  +    
  +    public DOMBuilder(Node parentNode) {
  +        // Set the document as the owner of this node
  +        this.document = parentNode.getOwnerDocument();
  +        // Create a namespace table
  +        this.namespaces=new NamespacesTable();
  +        // Set the current node
  +        this.current = parentNode;
  +        // Go directly to BODY state
  +        this.state = S_BODY;
  +    }
  +        
  +    /**     * Return the newly built Document.
        */
       public Document getDocument() {
           return(this.document);
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org