You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by rp...@locus.apache.org on 2000/01/06 23:00:12 UTC

cvs commit: xml-xerces/java/src/org/w3c/dom Attr.java CDATASection.java CharacterData.java Comment.java DOMImplementation.java Document.java DocumentFragment.java DocumentType.java Element.java Entity.java EntityReference.java Makefile NamedNodeMap.java Node.java NodeList.java Notation.java ProcessingInstruction.java Text.java

rpfeiffe    00/01/06 14:00:11

  Modified:    java/src/org/w3c/dom Attr.java CDATASection.java
                        CharacterData.java Comment.java
                        DOMImplementation.java Document.java
                        DocumentFragment.java DocumentType.java
                        Element.java Entity.java EntityReference.java
                        Makefile NamedNodeMap.java Node.java NodeList.java
                        Notation.java ProcessingInstruction.java Text.java
  Log:
  DOM Level 2 - upgraded org.w3c.dom Interfaces to:
  W3C Candidate Recommendation 10 December, 1999
  -rip
  
  Revision  Changes    Path
  1.2       +73 -56    xml-xerces/java/src/org/w3c/dom/Attr.java
  
  Index: Attr.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/Attr.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Attr.java	1999/11/09 01:11:22	1.1
  +++ Attr.java	2000/01/06 22:00:09	1.2
  @@ -1,11 +1,14 @@
  -/** 
  - * ----- 
  - * Copyright (c) World Wide Web Consortium, (Massachusetts Institute of 
  - * Technology, Institut National de Recherche en Informatique et en 
  - * Automatique, Keio University). All Rights Reserved. 
  - * http://www.w3.org/Consortium/Legal/ 
  - * ----- 
  - */ 
  +/*
  + * Copyright (c) 1999 World Wide Web Consortium,
  + * (Massachusetts Institute of Technology, Institut National de
  + * Recherche en Informatique et en Automatique, Keio University). All
  + * Rights Reserved. This program is distributed under the W3C's Software
  + * Intellectual Property License. This program is distributed in the
  + * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
  + * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  + * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
  + * details.
  + */
   
   package org.w3c.dom;
   
  @@ -17,18 +20,19 @@
    * since they are not actually child nodes of the element  they describe, the 
    * DOM does not consider them part of the document  tree.  Thus, the 
    * <code>Node</code> attributes <code>parentNode</code>,  
  - * <code>previousSibling</code>, and <code>nextSibling</code> have a  null 
  - * value for <code>Attr</code> objects. The DOM takes the  view that 
  - * attributes are properties of elements rather than having a  separate 
  - * identity from the elements they are associated with;  this should make it 
  - * more efficient to implement such features as default attributes associated 
  - * with all elements of a  given type.  Furthermore, <code>Attr</code> nodes 
  - * may not be immediate children of a <code>DocumentFragment</code>. However, 
  - * they can be associated with <code>Element</code> nodes contained within a 
  - * <code>DocumentFragment</code>. In short, users and implementors of the DOM 
  - * need to be aware that  <code>Attr</code> nodes have some things in  common 
  - * with other objects inheriting the <code>Node</code> interface,  but they 
  - * also are quite distinct.
  + * <code>previousSibling</code>, and <code>nextSibling</code> have a  
  + * <code>null</code> value for <code>Attr</code> objects. The DOM takes the  
  + * view that attributes are properties of elements rather than having a  
  + * separate identity from the elements they are associated with;  this should 
  + * make it more efficient to implement such features as default attributes 
  + * associated with all elements of a  given type.  Furthermore, 
  + * <code>Attr</code> nodes may not be immediate children of a 
  + * <code>DocumentFragment</code>. However, they can be associated with 
  + * <code>Element</code> nodes contained within a <code>DocumentFragment</code>
  + * . In short, users and implementors of the DOM need to be aware that  
  + * <code>Attr</code> nodes have some things in  common with other objects 
  + * inheriting the <code>Node</code> interface,  but they also are quite 
  + * distinct.
    * <p> The attribute's effective value is determined as follows: if this  
    * attribute has been explicitly assigned any value, that value is the  
    * attribute's effective value; otherwise, if there is a declaration for  
  @@ -42,43 +46,56 @@
    * the child nodes of the <code>Attr</code> node provide a representation in 
    * which entity references are not expanded. These child nodes may be either 
    * <code>Text</code> or <code>EntityReference</code> nodes. Because the 
  - * attribute type may be unknown, there are no tokenized attribute values.
  - *
  - * @version
  + * attribute type may be unknown, there are no tokenized attribute values. 
    */
   public interface Attr extends Node {
  -  /**
  -   * Returns the name of this attribute. 
  -   */
  -  public String             getName();
  -  /**
  -   * If this attribute was explicitly given a value in the original document, 
  -   * this is <code>true</code>; otherwise, it is <code>false</code>. Note 
  -   * that the implementation is in charge of this attribute, not the user. If 
  -   * the user changes the value of the attribute (even if it ends up having 
  -   * the same value as the default value) then the <code>specified</code> 
  -   * flag is automatically flipped to <code>true</code>.  To re-specify the 
  -   * attribute as the default value from the DTD, the user must delete the 
  -   * attribute. The implementation will then make a new attribute available 
  -   * with <code>specified</code> set to <code>false</code> and the default 
  -   * value (if one exists).
  -   * <br>In summary: If the attribute has an assigned value in the document 
  -   * then  <code>specified</code> is <code>true</code>, and the value is the  
  -   * assigned value. If the attribute has no assigned value in the document 
  -   * and has  a default value in the DTD, then <code>specified</code> is 
  -   * <code>false</code>,  and the value is the default value in the DTD. If 
  -   * the attribute has no assigned value in the document and has  a value of 
  -   * #IMPLIED in the DTD, then the  attribute does not appear  in the 
  -   * structure model of the document.
  -   */
  -  public boolean            getSpecified();
  -  /**
  -   * On retrieval, the value of the attribute is returned as a string. 
  -   * Character and general entity references are replaced with their values.
  -   * <br>On setting, this creates a <code>Text</code> node with the unparsed 
  -   * contents of the string.
  -   */
  -  public String             getValue();
  -  public void               setValue(String value);
  +    /**
  +     * Returns the name of this attribute. 
  +     */
  +    public String       getName();
  +    /**
  +     * If this attribute was explicitly given a value in the original 
  +     * document, this is <code>true</code>; otherwise, it is 
  +     * <code>false</code>. Note that the implementation is in charge of this 
  +     * attribute, not the user. If the user changes the value of the 
  +     * attribute (even if it ends up having the same value as the default 
  +     * value) then the <code>specified</code> flag is automatically flipped 
  +     * to <code>true</code>.  To re-specify the attribute as the default 
  +     * value from the DTD, the user must delete the attribute. The 
  +     * implementation will then make a new attribute available with 
  +     * <code>specified</code> set to <code>false</code> and the default value 
  +     * (if one exists).
  +     * <br>In summary: If the attribute has an assigned value in the document 
  +     * then  <code>specified</code> is <code>true</code>, and the value is 
  +     * the  assigned value. If the attribute has no assigned value in the 
  +     * document and has  a default value in the DTD, then 
  +     * <code>specified</code> is <code>false</code>,  and the value is the 
  +     * default value in the DTD. If the attribute has no assigned value in 
  +     * the document and has  a value of #IMPLIED in the DTD, then the  
  +     * attribute does not appear  in the structure model of the document.
  +     */
  +    public boolean      getSpecified();
  +    /**
  +     * On retrieval, the value of the attribute is returned as a string. 
  +     * Character and general entity references are replaced with their 
  +     * values. See also the method <code>getAttribute</code> on the  
  +     * <code>Element</code> interface.
  +     * <br>On setting, this creates a <code>Text</code> node with the unparsed 
  +     * contents of the string. I.e. any characters that an XML processor would
  +     *  recognize as markup are instead treated as literal text. See also the 
  +     * method <code>setAttribute</code> on the  <code>Element</code> 
  +     * interface.
  +     * @exception DOMException
  +     *   NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
  +     */
  +    public String       getValue();
  +    public void         setValue(String value)
  +                                    throws DOMException;
  +    /**
  +     * The <code>Element</code> node this attribute is attached to or 
  +     * <code>null</code> if this attribute is not in use.
  +     * @since DOM Level 2
  +     */
  +    public Element      getOwnerElement();
   }
   
  
  
  
  1.2       +27 -13    xml-xerces/java/src/org/w3c/dom/CDATASection.java
  
  Index: CDATASection.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/CDATASection.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CDATASection.java	1999/11/09 01:11:22	1.1
  +++ CDATASection.java	2000/01/06 22:00:09	1.2
  @@ -1,11 +1,14 @@
  -/** 
  - * ----- 
  - * Copyright (c) World Wide Web Consortium, (Massachusetts Institute of 
  - * Technology, Institut National de Recherche en Informatique et en 
  - * Automatique, Keio University). All Rights Reserved. 
  - * http://www.w3.org/Consortium/Legal/ 
  - * ----- 
  - */ 
  +/*
  + * Copyright (c) 1999 World Wide Web Consortium,
  + * (Massachusetts Institute of Technology, Institut National de
  + * Recherche en Informatique et en Automatique, Keio University). All
  + * Rights Reserved. This program is distributed under the W3C's Software
  + * Intellectual Property License. This program is distributed in the
  + * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
  + * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  + * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
  + * details.
  + */
   
   package org.w3c.dom;
   
  @@ -21,13 +24,24 @@
    * contain characters that need to be escaped outside of CDATA sections and 
    * that, depending on the character encoding ("charset") chosen for 
    * serialization, it may be impossible to write out some characters as part 
  - * of a CDATA section.
  - * <p> The <code>CDATASection</code> interface inherits the 
  + * of a CDATA section. 
  + * <p> The <code>CDATASection</code> interface inherits from the 
    * <code>CharacterData</code> interface through the <code>Text</code> 
    * interface. Adjacent <code>CDATASections</code> nodes are not merged by use 
  - * of the Element.normalize() method.
  - *
  - * @version
  + * of the <code>normalize</code> method of the <code>Element</code> interface.
  + * Because no markup is recognized within a <code>CDATASection</code>, 
  + * character numeric references cannot be used as an escape mechanism when 
  + * serializing. Therefore, action needs to be taken when serializing a 
  + * <code>CDATASection</code> with a character encoding where some of the 
  + * contained characters cannot be represented. Failure to do so would not 
  + * produce well-formed XML. One potential solution in the serialization 
  + * process is to  end the CDATA Section before the character, output the 
  + * character using a  character reference or entity reference, and open a new 
  + * CDATA section  for any further characters in the text node. Note, however, 
  + * that some  code conversion libraries at the time of writing do not return 
  + * an error or exception when a character is missing from the encoding,  
  + * making the task of ensuring data is not corrupted on serialization more 
  + * difficult. 
    */
   public interface CDATASection extends Text {
   }
  
  
  
  1.2       +123 -113  xml-xerces/java/src/org/w3c/dom/CharacterData.java
  
  Index: CharacterData.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/CharacterData.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CharacterData.java	1999/11/09 01:11:22	1.1
  +++ CharacterData.java	2000/01/06 22:00:09	1.2
  @@ -1,127 +1,137 @@
  -/** 
  - * ----- 
  - * Copyright (c) World Wide Web Consortium, (Massachusetts Institute of 
  - * Technology, Institut National de Recherche en Informatique et en 
  - * Automatique, Keio University). All Rights Reserved. 
  - * http://www.w3.org/Consortium/Legal/ 
  - * ----- 
  - */ 
  +/*
  + * Copyright (c) 1999 World Wide Web Consortium,
  + * (Massachusetts Institute of Technology, Institut National de
  + * Recherche en Informatique et en Automatique, Keio University). All
  + * Rights Reserved. This program is distributed under the W3C's Software
  + * Intellectual Property License. This program is distributed in the
  + * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
  + * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  + * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
  + * details.
  + */
   
   package org.w3c.dom;
   
   /**
  - * The <code>CharacterData</code> interface extends Node with a set  of 
  + * The <code>CharacterData</code> interface extends Node with a set of 
    * attributes and methods for accessing character data in the DOM.  For 
    * clarity this set is defined here rather than on each object that uses 
    * these attributes and methods. No DOM objects correspond directly to 
    * <code>CharacterData</code>, though <code>Text</code> and others do inherit 
  - * the interface from it. All <code>offset</code>s in this interface start 
  + * the interface from it. All <code>offsets</code> in this interface start 
    * from 0.
  - *
  - * @version
  + * <p>As explained in the <code>DOMString</code> interface, text strings in 
  + * the DOM are represented in UTF-16, i.e. as a sequence of 16-bit units.  In 
  + * the following, the term 16-bit units is used whenever necessary to 
  + * indicate that indexing on CharacterData is done in 16-bit units.
    */
   public interface CharacterData extends Node {
  -  /**
  -   * The character data of the node that implements this interface. The DOM 
  -   * implementation may not put arbitrary limits on the amount of data that 
  -   * may be stored in a  <code>CharacterData</code> node. However, 
  -   * implementation limits may  mean that the entirety of a node's data may 
  -   * not fit into a single <code>DOMString</code>. In such cases, the user 
  -   * may call <code>substringData</code> to retrieve the data in 
  -   * appropriately sized pieces.
  -   * @exception DOMException
  -   *   NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
  -   * @exception DOMException
  -   *   DOMSTRING_SIZE_ERR: Raised when it would return more characters than 
  -   *   fit in a <code>DOMString</code> variable on the implementation 
  -   *   platform.
  -   */
  -  public String             getData()
  -                                 throws DOMException;
  -  public void               setData(String data)
  -                                 throws DOMException;
  -  /**
  -   * The number of characters that are available through <code>data</code> and 
  -   * the <code>substringData</code> method below.  This may have the value 
  -   * zero,  i.e., <code>CharacterData</code> nodes may be empty.
  -   */
  -  public int                getLength();
  -  /**
  -   * Extracts a range of data from the node.
  -   * @param offset Start offset of substring to extract.
  -   * @param count The number of characters to extract.
  -   * @return The specified substring. If the sum of <code>offset</code> and 
  -   *   <code>count</code> exceeds the <code>length</code>, then all 
  -   *   characters to the end of the data are returned.
  -   * @exception DOMException
  -   *   INDEX_SIZE_ERR: Raised if the specified offset is negative or greater 
  -   *   than the number of characters in <code>data</code>, or if the 
  -   *   specified <code>count</code> is negative.
  -   *   <br>DOMSTRING_SIZE_ERR: Raised if the specified range of text does not 
  -   *   fit into a <code>DOMString</code>.
  -   */
  -  public String             substringData(int offset, 
  -                                          int count)
  +    /**
  +     * The character data of the node that implements this interface. The DOM 
  +     * implementation may not put arbitrary limits on the amount of data that 
  +     * may be stored in a  <code>CharacterData</code> node. However, 
  +     * implementation limits may  mean that the entirety of a node's data may 
  +     * not fit into a single <code>DOMString</code>. In such cases, the user 
  +     * may call <code>substringData</code> to retrieve the data in 
  +     * appropriately sized pieces.
  +     * @exception DOMException
  +     *   NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
  +     * @exception DOMException
  +     *   DOMSTRING_SIZE_ERR: Raised when it would return more characters than 
  +     *   fit in a <code>DOMString</code> variable on the implementation 
  +     *   platform.
  +     */
  +    public String       getData()
  +                                          throws DOMException;
  +    public void         setData(String data)
                                             throws DOMException;
  -  /**
  -   * Append the string to the end of the character data of the node. Upon 
  -   * success, <code>data</code> provides access to the concatenation of 
  -   * <code>data</code> and the <code>DOMString</code> specified.
  -   * @param arg The <code>DOMString</code> to append.
  -   * @exception DOMException
  -   *   NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
  -   */
  -  public void               appendData(String arg)
  -                                       throws DOMException;
  -  /**
  -   * Insert a string at the specified character offset.
  -   * @param offset The character offset at which to insert.
  -   * @param arg The <code>DOMString</code> to insert.
  -   * @exception DOMException
  -   *   INDEX_SIZE_ERR: Raised if the specified offset is negative or greater 
  -   *   than the number of characters in <code>data</code>.
  -   *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
  -   */
  -  public void               insertData(int offset, 
  -                                       String arg)
  -                                       throws DOMException;
  -  /**
  -   * Remove a range of characters from the node. Upon success, 
  -   * <code>data</code> and <code>length</code> reflect the change.
  -   * @param offset The offset from which to remove characters.
  -   * @param count The number of characters to delete. If the sum of 
  -   *   <code>offset</code> and <code>count</code> exceeds <code>length</code> 
  -   *   then all characters from <code>offset</code> to the end of the data 
  -   *   are deleted.
  -   * @exception DOMException
  -   *   INDEX_SIZE_ERR: Raised if the specified offset is negative or greater 
  -   *   than the number of characters in <code>data</code>, or if the 
  -   *   specified <code>count</code> is negative.
  -   *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
  -   */
  -  public void               deleteData(int offset, 
  -                                       int count)
  -                                       throws DOMException;
  -  /**
  -   * Replace the characters starting at the specified character offset with 
  -   * the specified string.
  -   * @param offset The offset from which to start replacing.
  -   * @param count The number of characters to replace. If the sum of 
  -   *   <code>offset</code> and <code>count</code> exceeds <code>length</code>
  -   *   , then all characters to the end of the data are replaced (i.e., the 
  -   *   effect is the same as a <code>remove</code> method call with the same 
  -   *   range, followed by an <code>append</code> method invocation).
  -   * @param arg The <code>DOMString</code> with which the range must be 
  -   *   replaced.
  -   * @exception DOMException
  -   *   INDEX_SIZE_ERR: Raised if the specified offset is negative or greater 
  -   *   than the number of characters in <code>data</code>, or if the 
  -   *   specified <code>count</code> is negative.
  -   *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
  -   */
  -  public void               replaceData(int offset, 
  -                                        int count, 
  -                                        String arg)
  -                                        throws DOMException;
  +    /**
  +     * The number of 16-bit units that are available through <code>data</code> 
  +     * and the <code>substringData</code> method below.  This may have the 
  +     * value zero, i.e., <code>CharacterData</code> nodes may be empty.
  +     */
  +    public int          getLength();
  +    /**
  +     * Extracts a range of data from the node.
  +     * @param offset Start offset of substring to extract.
  +     * @param count The number of 16-bit units to extract.
  +     * @return The specified substring. If the sum of <code>offset</code> and 
  +     *   <code>count</code> exceeds the <code>length</code>, then all 16-bit 
  +     *   units to the end of the data are returned.
  +     * @exception DOMException
  +     *   INDEX_SIZE_ERR: Raised if the specified <code>offset</code> is 
  +     *   negative or greater than the number of 16-bit units in 
  +     *   <code>data</code>, or if the specified <code>count</code> is 
  +     *   negative.
  +     *   <br>DOMSTRING_SIZE_ERR: Raised if the specified range of text does 
  +     *   not fit into a <code>DOMString</code>.
  +     */
  +    public String       substringData(int offset, 
  +                                      int count)
  +                                      throws DOMException;
  +    /**
  +     * Append the string to the end of the character data of the node. Upon 
  +     * success, <code>data</code> provides access to the concatenation of 
  +     * <code>data</code> and the <code>DOMString</code> specified.
  +     * @param arg The <code>DOMString</code> to append.
  +     * @exception DOMException
  +     *   NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
  +     */
  +    public void         appendData(String arg)
  +                                   throws DOMException;
  +    /**
  +     * Insert a string at the specified character offset.
  +     * @param offset The character offset at which to insert.
  +     * @param arg The <code>DOMString</code> to insert.
  +     * @exception DOMException
  +     *   INDEX_SIZE_ERR: Raised if the specified <code>offset</code> is 
  +     *   negative or greater than the number of 16-bit units in 
  +     *   <code>data</code>.
  +     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
  +     */
  +    public void         insertData(int offset, 
  +                                   String arg)
  +                                   throws DOMException;
  +    /**
  +     * Remove a range of 16-bit units from the node. Upon success, 
  +     * <code>data</code> and <code>length</code> reflect the change.
  +     * @param offset The offset from which to start removing.
  +     * @param count The number of 16-bit units to delete. If the sum of 
  +     *   <code>offset</code> and <code>count</code> exceeds 
  +     *   <code>length</code> then all 16-bit units from <code>offset</code> 
  +     *   to the end of the data are deleted.
  +     * @exception DOMException
  +     *   INDEX_SIZE_ERR: Raised if the specified <code>offset</code> is 
  +     *   negative or greater than the number of 16-bit units in 
  +     *   <code>data</code>, or if the specified <code>count</code> is 
  +     *   negative.
  +     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
  +     */
  +    public void         deleteData(int offset, 
  +                                   int count)
  +                                   throws DOMException;
  +    /**
  +     * Replace the characters starting at the specified 16-bit unit offset 
  +     * with the specified string.
  +     * @param offset The offset from which to start replacing.
  +     * @param count The number of 16-bit units to replace. If the sum of 
  +     *   <code>offset</code> and <code>count</code> exceeds 
  +     *   <code>length</code>, then all 16-bit units to the end of the data 
  +     *   are replaced (i.e., the effect is the same as a <code>remove</code> 
  +     *   method call with the same range, followed by an <code>append</code> 
  +     *   method invocation).
  +     * @param arg The <code>DOMString</code> with which the range must be 
  +     *   replaced.
  +     * @exception DOMException
  +     *   INDEX_SIZE_ERR: Raised if the specified <code>offset</code> is 
  +     *   negative or greater than the number of 16-bit units in 
  +     *   <code>data</code>, or if the specified <code>count</code> is 
  +     *   negative.
  +     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
  +     */
  +    public void         replaceData(int offset, 
  +                                    int count, 
  +                                    String arg)
  +                                    throws DOMException;
   }
   
  
  
  
  1.2       +16 -14    xml-xerces/java/src/org/w3c/dom/Comment.java
  
  Index: Comment.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/Comment.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Comment.java	1999/11/09 01:11:22	1.1
  +++ Comment.java	2000/01/06 22:00:09	1.2
  @@ -1,21 +1,23 @@
  -/** 
  - * ----- 
  - * Copyright (c) World Wide Web Consortium, (Massachusetts Institute of 
  - * Technology, Institut National de Recherche en Informatique et en 
  - * Automatique, Keio University). All Rights Reserved. 
  - * http://www.w3.org/Consortium/Legal/ 
  - * ----- 
  - */ 
  +/*
  + * Copyright (c) 1999 World Wide Web Consortium,
  + * (Massachusetts Institute of Technology, Institut National de
  + * Recherche en Informatique et en Automatique, Keio University). All
  + * Rights Reserved. This program is distributed under the W3C's Software
  + * Intellectual Property License. This program is distributed in the
  + * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
  + * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  + * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
  + * details.
  + */
   
   package org.w3c.dom;
   
   /**
  - * This represents the content of a comment, i.e., all the characters between 
  - * the starting '<code>&lt;!--</code>' and ending '<code>--&gt;</code>'. Note 
  - * that this is the definition of a comment in XML, and, in practice, HTML, 
  - * although some HTML tools may implement the full SGML comment structure.
  - *
  - * @version
  + * This interface inherits from <code>CharacterData</code> and represents the 
  + * content of a comment, i.e., all the characters between the starting '
  + * <code>&lt;!--</code>' and ending '<code>--&gt;</code>'. Note that this is 
  + * the definition of a comment in XML, and, in practice, HTML, although some 
  + * HTML tools may implement the full SGML comment structure.
    */
   public interface Comment extends CharacterData {
   }
  
  
  
  1.2       +69 -28    xml-xerces/java/src/org/w3c/dom/DOMImplementation.java
  
  Index: DOMImplementation.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/DOMImplementation.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DOMImplementation.java	1999/11/09 01:11:23	1.1
  +++ DOMImplementation.java	2000/01/06 22:00:09	1.2
  @@ -1,38 +1,79 @@
  -/** 
  - * ----- 
  - * Copyright (c) World Wide Web Consortium, (Massachusetts Institute of 
  - * Technology, Institut National de Recherche en Informatique et en 
  - * Automatique, Keio University). All Rights Reserved. 
  - * http://www.w3.org/Consortium/Legal/ 
  - * ----- 
  - */ 
  +/*
  + * Copyright (c) 1999 World Wide Web Consortium,
  + * (Massachusetts Institute of Technology, Institut National de
  + * Recherche en Informatique et en Automatique, Keio University). All
  + * Rights Reserved. This program is distributed under the W3C's Software
  + * Intellectual Property License. This program is distributed in the
  + * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
  + * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  + * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
  + * details.
  + */
   
   package org.w3c.dom;
   
   /**
    * The <code>DOMImplementation</code> interface provides a number of methods 
    * for performing operations that are independent of any particular instance 
  - * of the document object model. 
  - * <p>The DOM Level 1 does not specify a way of creating a document instance, 
  - * and hence document creation is an operation specific to an implementation. 
  - * Future Levels of the DOM specification are expected to provide methods for 
  - * creating documents directly.
  - *
  - * @version
  + * of the document object model.
    */
   public interface DOMImplementation {
  -  /**
  -   * Test if the DOM implementation implements a specific feature.
  -   * @param feature The package name of the feature to test. In Level 1, the 
  -   *   legal values are "HTML" and "XML" (case-insensitive).
  -   * @param version This is the version number of the package name to test.  
  -   *   In Level 1, this is the string "1.0". If the version is not specified, 
  -   *   supporting any version of the  feature will cause the method to return 
  -   *   <code>true</code>. 
  -   * @return <code>true</code> if the feature is implemented in the specified 
  -   *   version, <code>false</code> otherwise.
  -   */
  -  public boolean            hasFeature(String feature, 
  -                                       String version);
  +    /**
  +     * Test if the DOM implementation implements a specific feature.
  +     * @param feature The string of the feature to test (case-insensitive). The
  +     *    legal values are defined throughout this specification. The string 
  +     *   must be an XML name (see also ).
  +     * @param version This is the version number of the feature to test. In 
  +     *   Level 2, this is the string "2.0". If the version is not specified, 
  +     *   supporting any version of the feature will cause the method to 
  +     *   return <code>true</code>.
  +     * @return <code>true</code> if the feature is implemented in the 
  +     *   specified version, <code>false</code> otherwise.
  +     */
  +    public boolean      hasFeature(String feature, 
  +                                   String version);
  +    /**
  +     * Creates an empty <code>DocumentType</code> node. Entity declarations 
  +     * and notations are not made available. Entity reference expansions and 
  +     * default attribute additions do not occur. It is expected that a future 
  +     * version of the DOM will provide a way for populating a 
  +     * <code>DocumentType</code>.
  +     * <br>HTML-only DOM implementations do not need to implement this method.
  +     * @since DOM Level 2
  +     * @param qualifiedName The qualified name of the document type to be 
  +     *   created. 
  +     * @param publicId The external subset public identifier.
  +     * @param systemId The external subset system identifier.
  +     * @param internalSubset The internal subset as a string. This should be 
  +     *   valid.
  +     * @return A new <code>DocumentType</code> node with 
  +     *   <code>Node.ownerDocument</code> set to <code>null</code>.
  +     */
  +    public DocumentType createDocumentType(String qualifiedName, 
  +                                           String publicId, 
  +                                           String systemId, 
  +                                           String internalSubset);
  +    /**
  +     * Creates an XML <code>Document</code> object of the specified type with 
  +     * its document element. HTML-only DOM implementations do not need to 
  +     * implement this method.
  +     * @since DOM Level 2
  +     * @param namespaceURI The namespace URI of the document element to 
  +     *   create, or <code>null</code>.
  +     * @param qualifiedName The qualified name of the document element to be 
  +     *   created.
  +     * @param doctype The type of document to be created or <code>null</code>.
  +     *   When <code>doctype</code> is not <code>null</code>, its 
  +     *   <code>Node.ownerDocument</code> attribute is set to the document 
  +     *   being created.
  +     * @return A new <code>Document</code> object.
  +     * @exception DOMException
  +     *   WRONG_DOCUMENT_ERR: Raised if <code>doctype</code> has already been 
  +     *   used with a different document.
  +     */
  +    public Document     createDocument(String namespaceURI, 
  +                                       String qualifiedName, 
  +                                       DocumentType doctype)
  +                                       throws DOMException;
   }
   
  
  
  
  1.2       +314 -118  xml-xerces/java/src/org/w3c/dom/Document.java
  
  Index: Document.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/Document.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Document.java	1999/11/09 01:11:23	1.1
  +++ Document.java	2000/01/06 22:00:09	1.2
  @@ -1,11 +1,14 @@
  -/** 
  - * ----- 
  - * Copyright (c) World Wide Web Consortium, (Massachusetts Institute of 
  - * Technology, Institut National de Recherche en Informatique et en 
  - * Automatique, Keio University). All Rights Reserved. 
  - * http://www.w3.org/Consortium/Legal/ 
  - * ----- 
  - */ 
  +/*
  + * Copyright (c) 1999 World Wide Web Consortium,
  + * (Massachusetts Institute of Technology, Institut National de
  + * Recherche en Informatique et en Automatique, Keio University). All
  + * Rights Reserved. This program is distributed under the W3C's Software
  + * Intellectual Property License. This program is distributed in the
  + * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
  + * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  + * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
  + * details.
  + */
   
   package org.w3c.dom;
   
  @@ -16,119 +19,312 @@
    * <p>Since elements, text nodes, comments, processing instructions, etc. 
    * cannot exist outside the context of a <code>Document</code>, the 
    * <code>Document</code> interface also contains the factory methods needed 
  - * to create these objects.  The <code>Node</code> objects created have a 
  + * to create these objects. The <code>Node</code> objects created have a 
    * <code>ownerDocument</code> attribute which associates them with the 
  - * <code>Document</code> within whose  context they were created.
  - *
  - * @version
  + * <code>Document</code> within whose context they were created.
    */
   public interface Document extends Node {
  -  /**
  -   * The Document Type Declaration (see <code>DocumentType</code>) associated 
  -   * with  this document. For HTML documents as well as XML documents without 
  -   * a document type declaration this returns <code>null</code>. The DOM Level
  -   *  1 does not support editing the Document Type Declaration, therefore 
  -   * <code>docType</code> cannot be altered in any way.
  -   */
  -  public DocumentType       getDoctype();
  -  /**
  -   * The <code>DOMImplementation</code> object that handles this document. A 
  -   * DOM application may use objects from multiple  implementations.
  -   */
  -  public DOMImplementation  getImplementation();
  -  /**
  -   * This is a convenience attribute that allows direct access to the child 
  -   * node that is the root element of  the document. For HTML documents, this 
  -   * is the element with the tagName "HTML".
  -   */
  -  public Element            getDocumentElement();
  -  /**
  -   * Creates an element of the type specified. Note that the instance returned 
  -   * implements the Element interface, so attributes can be specified 
  -   * directly  on the returned object.
  -   * @param tagName The name of the element type to instantiate. For XML, this 
  -   *   is case-sensitive. For HTML, the  <code>tagName</code> parameter may 
  -   *   be provided in any case,  but it must be mapped to the canonical 
  -   *   uppercase form by  the DOM implementation. 
  -   * @return A new <code>Element</code> object.
  -   * @exception DOMException
  -   *   INVALID_CHARACTER_ERR: Raised if the specified name contains an 
  -   *   invalid character.
  -   */
  -  public Element            createElement(String tagName)
  +    /**
  +     * The Document Type Declaration (see <code>DocumentType</code>) 
  +     * associated with this document. For HTML documents as well as XML 
  +     * documents without a document type declaration this returns 
  +     * <code>null</code>. The DOM Level 2 does not support editing the 
  +     * Document Type Declaration, therefore <code>docType</code> cannot be 
  +     * altered in any way, including through the use of methods, such as 
  +     * <code>insertNode</code> or <code>removeNode</code>, inherited from 
  +     * <code>Node</code>.
  +     */
  +    public DocumentType getDoctype();
  +    /**
  +     * The <code>DOMImplementation</code> object that handles this document. A 
  +     * DOM application may use objects from multiple  implementations.
  +     */
  +    public DOMImplementation getImplementation();
  +    /**
  +     * This is a convenience attribute that allows direct access to the child 
  +     * node that is the root element of  the document. For HTML documents, 
  +     * this is the element with the tagName "HTML".
  +     */
  +    public Element      getDocumentElement();
  +    /**
  +     * Creates an element of the type specified. Note that the instance 
  +     * returned implements the <code>Element</code> interface, so attributes 
  +     * can be specified directly  on the returned object.
  +     * <br>In addition, if there are known attributes with default values, 
  +     * <code>Attr</code> nodes representing them are automatically created and
  +     *  attached to the element.
  +     * <br>To create an element with a qualified name and namespace URI, use 
  +     * the <code>createElementNS</code> method.
  +     * @param tagName The name of the element type to instantiate. For XML, 
  +     *   this is case-sensitive. For HTML, the  <code>tagName</code> 
  +     *   parameter may be provided in any case,  but it must be mapped to the 
  +     *   canonical uppercase form by  the DOM implementation. 
  +     * @return A new <code>Element</code> object with the <code>nodeName</code>
  +     *    attribute set to <code>tagName</code>, and <code>localName</code>, 
  +     *   <code>prefix</code>, and <code>namespaceURI</code> set to 
  +     *   <code>null</code>.
  +     * @exception DOMException
  +     *   INVALID_CHARACTER_ERR: Raised if the specified name contains an 
  +     *   illegal character.
  +     */
  +    public Element      createElement(String tagName)
  +                                      throws DOMException;
  +    /**
  +     * Creates an empty <code>DocumentFragment</code> object. 
  +     * @return A new <code>DocumentFragment</code>.
  +     */
  +    public DocumentFragment createDocumentFragment();
  +    /**
  +     * Creates a <code>Text</code> node given the specified string.
  +     * @param data The data for the node.
  +     * @return The new <code>Text</code> object.
  +     */
  +    public Text         createTextNode(String data);
  +    /**
  +     * Creates a <code>Comment</code> node given the specified string.
  +     * @param data The data for the node.
  +     * @return The new <code>Comment</code> object.
  +     */
  +    public Comment      createComment(String data);
  +    /**
  +     * Creates a <code>CDATASection</code> node whose value  is the specified 
  +     * string.
  +     * @param data The data for the <code>CDATASection</code> contents.
  +     * @return The new <code>CDATASection</code> object.
  +     * @exception DOMException
  +     *   NOT_SUPPORTED_ERR: Raised if this document is an HTML document.
  +     */
  +    public CDATASection createCDATASection(String data)
  +                                           throws DOMException;
  +    /**
  +     * Creates a <code>ProcessingInstruction</code> node given the specified 
  +     * name and data strings.
  +     * @param target The target part of the processing instruction.
  +     * @param data The data for the node.
  +     * @return The new <code>ProcessingInstruction</code> object.
  +     * @exception DOMException
  +     *   INVALID_CHARACTER_ERR: Raised if an illegal character is specified.
  +     *   <br>NOT_SUPPORTED_ERR: Raised if this document is an HTML document.
  +     */
  +    public ProcessingInstruction createProcessingInstruction(String target, 
  +                                                             String data)
  +                                                             throws DOMException;
  +    /**
  +     * Creates an <code>Attr</code> of the given name. Note that the 
  +     * <code>Attr</code> instance can then be set on an <code>Element</code> 
  +     * using the <code>setAttribute</code> method. 
  +     * <br>To create an attribute with a qualified name and namespace URI, use 
  +     * the <code>createAttributeNS</code> method.
  +     * @param name The name of the attribute.
  +     * @return A new <code>Attr</code> object with the <code>nodeName</code> 
  +     *   attribute set to <code>name</code>, and <code>localName</code>, 
  +     *   <code>prefix</code>, and <code>namespaceURI</code> set to 
  +     *   <code>null</code>.
  +     * @exception DOMException
  +     *   INVALID_CHARACTER_ERR: Raised if the specified name contains an 
  +     *   illegal character.
  +     */
  +    public Attr         createAttribute(String name)
  +                                        throws DOMException;
  +    /**
  +     * Creates an <code>EntityReference</code> object. In addition, if the 
  +     * referenced entity is known, the child list of the 
  +     * <code>EntityReference</code> node is made the same as that of the 
  +     * corresponding <code>Entity</code> node.If any descendant of the 
  +     * <code>Entity</code> node has an unbound namespace prefix, the 
  +     * corresponding descendant of the created <code>EntityReference</code> 
  +     * node is also unbound (its <code>namespaceURI</code> is 
  +     * <code>null</code>). The DOM Level 2 does not support any mechanism to 
  +     * resolve namespace prefixes.
  +     * @param name The name of the entity to reference. 
  +     * @return The new <code>EntityReference</code> object.
  +     * @exception DOMException
  +     *   INVALID_CHARACTER_ERR: Raised if the specified name contains an 
  +     *   illegal character.
  +     *   <br>NOT_SUPPORTED_ERR: Raised if this document is an HTML document.
  +     */
  +    public EntityReference createEntityReference(String name)
  +                                                 throws DOMException;
  +    /**
  +     * Returns a <code>NodeList</code> of all the <code>Elements</code> with a 
  +     * given tag name in the order in which they would be encountered in a 
  +     * preorder traversal of the <code>Document</code> tree. 
  +     * @param tagname The name of the tag to match on. The special value "*" 
  +     *   matches all tags.
  +     * @return A new <code>NodeList</code> object containing all the matched 
  +     *   <code>Elements</code>.
  +     */
  +    public NodeList     getElementsByTagName(String tagname);
  +    /**
  +     * Imports a node from another document to this document. The returned 
  +     * node has no parent (<code>parentNode</code> is <code>null</code>). The 
  +     * source node is not altered or removed from the original document; this 
  +     * method creates a new copy of the source node.
  +     * <br>For all nodes, importing a node creates a node object owned by the 
  +     * importing document, with attribute values identical to the source 
  +     * node's <code>nodeName</code> and <code>nodeType</code>, plus the 
  +     * attributes related to namespaces (prefix and namespaces URI). As in the
  +     *  <code>cloneNode</code> operation on a <code>Node</code>, the source 
  +     * node is not altered.
  +     * <br>Additional information is copied as appropriate to the 
  +     * <code>nodeType</code>, attempting to mirror the behavior expected if a 
  +     * fragment of XML or HTML source was copied from one document to another,
  +     *  recognizing that the two documents may have different DTDs in the XML 
  +     * case. The following list describes the specifics for every type of 
  +     * node. ELEMENT_NODESpecified attribute nodes of the source element are 
  +     * imported, and the generated <code>Attr</code> nodes are attached to 
  +     * the generated <code>Element</code>. Default attributes are not copied, 
  +     * though if the document being imported into defines default attributes 
  +     * for this element name, those are assigned. If <code>importNode</code> 
  +     * <code>deep</code> parameter was set to <code>true</code>, the 
  +     * descendants of the source element will be recursively imported and the 
  +     * resulting nodes reassembled to form the corresponding subtree.
  +     * ATTRIBUTE_NODEThe <code>specified</code> flag is set to 
  +     * <code>true</code> on the generated <code>Attr</code>. The descendants 
  +     * of the the source <code>Attr</code> are recursively imported and the 
  +     * resulting nodes reassembled to form the corresponding subtree.Note 
  +     * that the <code>deep</code> parameter does not apply to 
  +     * <code>Attr</code> nodes; they always carry their children with them 
  +     * when imported.TEXT_NODE, CDATA_SECTION_NODE, COMMENT_NODEThese three 
  +     * types of nodes inheriting from <code>CharacterData</code> copy their 
  +     * <code>data</code> and <code>length</code> attributes from those of the 
  +     * source node.ENTITY_REFERENCE_NODEOnly the <code>EntityReference</code> 
  +     * itself is copied, even if a <code>deep</code> import is requested, 
  +     * since the source and destination documents might have defined the 
  +     * entity differently. If the document being imported into provides a 
  +     * definition for this entity name, its value is assigned.ENTITY_NODE
  +     * <code>Entity</code> nodes can be imported, however in the current 
  +     * release of the DOM the <code>DocumentType</code> is readonly. Ability 
  +     * to add these imported nodes to a <code>DocumentType</code> will be 
  +     * considered for addition to a future release of the DOM.On import, the 
  +     * <code>publicId</code>, <code>systemId</code>, and 
  +     * <code>notationName</code> attributes are copied. If a <code>deep</code>
  +     *  import is requested, the descendants of the the source 
  +     * <code>Entity</code> is recursively imported and the resulting nodes 
  +     * reassembled to form the corresponding subtree.
  +     * PROCESSING_INSTRUCTION_NODEThe imported node copies its 
  +     * <code>target</code> and <code>data</code> values from those of the 
  +     * source node.DOCUMENT_NODE<code>Document</code> nodes cannot be 
  +     * imported.DOCUMENT_TYPE_NODE<code>DocumentType</code> nodes cannot be 
  +     * imported.DOCUMENT_FRAGMENT_NODEIf the <code>deep</code> option was set 
  +     * <code>true</code>, the descendants of the source element will be 
  +     * recursively imported and the resulting nodes reassembled to form the 
  +     * corresponding subtree. Otherwise, this simply generates an empty 
  +     * <code>DocumentFragment</code>.NOTATION_NODE<code>Notation</code> nodes 
  +     * can be imported, however in the current release of the DOM the 
  +     * <code>DocumentType</code> is readonly. Ability to add these imported 
  +     * nodes to a <code>DocumentType</code> will be considered for addition 
  +     * to a future release of the DOM.On import, the <code>publicId</code>, 
  +     * and <code>systemId</code> attributes are copied.Note that the 
  +     * <code>deep</code> parameter does not apply to <code>Notation</code> 
  +     * nodes since they never have any children. 
  +     * @since DOM Level 2
  +     * @param importedNode The node to import.
  +     * @param deep If <code>true</code>, recursively import the subtree under 
  +     *   the specified node; if <code>false</code>, import only the node 
  +     *   itself, as explained above. This does not apply to <code>Attr</code>
  +     *   , <code>EntityReference</code>, and <code>Notation</code> nodes.
  +     * @return The imported node that belongs to this <code>Document</code>.
  +     * @exception DOMException
  +     *   NOT_SUPPORTED_ERR: Raised if the type of node being imported is not 
  +     *   supported.
  +     */
  +    public Node         importNode(Node importedNode, 
  +                                   boolean deep)
  +                                   throws DOMException;
  +    /**
  +     * Creates an element of the given qualified name and namespace URI. If 
  +     * the given <code>namespaceURI</code> is <code>null</code> or an empty 
  +     * string and the <code>qualifiedName</code> has a prefix that is "xml", 
  +     * the created element is bound to the predefined namespace 
  +     * "http://www.w3.org/XML/1998/namespace" .
  +     * <br>HTML-only DOM implementations do not need to implement this method.
  +     * @since DOM Level 2
  +     * @param namespaceURI The namespace URI of the element to create.
  +     * @param qualifiedName The qualified name of the element type to 
  +     *   instantiate.
  +     * @return A new <code>Element</code> object with the following attributes:
  +     *   AttributeValue<code>Node.nodeName</code><code>qualifiedName</code>
  +     *   <code>Node.namespaceURI</code><code>namespaceURI</code>, or 
  +     *   "http://www.w3.org/XML/1998/namespace" if <code>namespaceURI</code> 
  +     *   is <code>null</code> or an empty string, and the prefix is "xml"
  +     *   <code>Node.prefix</code>prefix, extracted from 
  +     *   <code>qualifiedName</code>, or <code>null</code> if there is no 
  +     *   prefix<code>Node.localName</code>local name, extracted from 
  +     *   <code>qualifiedName</code><code>Element.tagName</code>
  +     *   <code>qualifiedName</code>
  +     * @exception DOMException
  +     *   INVALID_CHARACTER_ERR: Raised if the specified qualified name 
  +     *   contains an illegal character.
  +     *   <br>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is 
  +     *   malformed, or if the <code>qualifiedName</code> has a prefix that is 
  +     *   "xml" and the <code>namespaceURI</code> is neither <code>null</code> 
  +     *   nor an empty string nor "http://www.w3.org/XML/1998/namespace".
  +     */
  +    public Element      createElementNS(String namespaceURI, 
  +                                        String qualifiedName)
  +                                        throws DOMException;
  +    /**
  +     * Creates an attribute of the given qualified name and namespace URI. If 
  +     * the given <code>namespaceURI</code> is <code>null</code> or an empty 
  +     * string and the <code>qualifiedName</code> has a prefix that is "xml", 
  +     * the created attribute is bound to the predefined namespace 
  +     * "http://www.w3.org/XML/1998/namespace" .
  +     * <br> HTML-only DOM implementations do not need to implement this method.
  +     * @since DOM Level 2
  +     * @param namespaceURI The namespace URI of the attribute to create.
  +     * @param qualifiedName The qualified name of the attribute to instantiate.
  +     * @return A new <code>Attr</code> object with the following attributes:
  +     *   AttributeValue<code>Node.nodeName</code>qualifiedName
  +     *   <code>Node.namespaceURI</code><code>namespaceURI</code>, or 
  +     *   "http://www.w3.org/XML/1998/namespace" if <code>namespaceURI</code> 
  +     *   is <code>null</code> or an empty string and the prefix is "xml"
  +     *   <code>Node.prefix</code>prefix, extracted from 
  +     *   <code>qualifiedName</code>, or <code>null</code> if there is no 
  +     *   prefix<code>Node.localName</code>local name, extracted from 
  +     *   <code>qualifiedName</code><code>Attr.name</code>
  +     *   <code>qualifiedName</code>
  +     * @exception DOMException
  +     *   INVALID_CHARACTER_ERR: Raised if the specified qualified name 
  +     *   contains an illegal character.
  +     *   <br>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is 
  +     *   malformed, if the <code>qualifiedName</code> has a prefix that is 
  +     *   "xml" and the <code>namespaceURI</code> is neither <code>null</code> 
  +     *   nor an empty string nor "http://www.w3.org/XML/1998/namespace", or 
  +     *   if the <code>qualifiedName</code> has a prefix that is "xmlns" but 
  +     *   the <code>namespaceURI</code> is neither <code>null</code> nor an 
  +     *   empty string.
  +     */
  +    public Attr         createAttributeNS(String namespaceURI, 
  +                                          String qualifiedName)
                                             throws DOMException;
  -  /**
  -   * Creates an empty <code>DocumentFragment</code> object. 
  -   * @return A new <code>DocumentFragment</code>.
  -   */
  -  public DocumentFragment   createDocumentFragment();
  -  /**
  -   * Creates a <code>Text</code> node given the specified string.
  -   * @param data The data for the node.
  -   * @return The new <code>Text</code> object.
  -   */
  -  public Text               createTextNode(String data);
  -  /**
  -   * Creates a <code>Comment</code> node given the specified string.
  -   * @param data The data for the node.
  -   * @return The new <code>Comment</code> object.
  -   */
  -  public Comment            createComment(String data);
  -  /**
  -   * Creates a <code>CDATASection</code> node whose value  is the specified 
  -   * string.
  -   * @param data The data for the <code>CDATASection</code> contents.
  -   * @return The new <code>CDATASection</code> object.
  -   * @exception DOMException
  -   *   NOT_SUPPORTED_ERR: Raised if this document is an HTML document.
  -   */
  -  public CDATASection       createCDATASection(String data)
  -                                               throws DOMException;
  -  /**
  -   * Creates a <code>ProcessingInstruction</code> node given the specified 
  -   * name and data strings.
  -   * @param target The target part of the processing instruction.
  -   * @param data The data for the node.
  -   * @return The new <code>ProcessingInstruction</code> object.
  -   * @exception DOMException
  -   *   INVALID_CHARACTER_ERR: Raised if an invalid character is specified.
  -   *   <br>NOT_SUPPORTED_ERR: Raised if this document is an HTML document.
  -   */
  -  public ProcessingInstruction createProcessingInstruction(String target, 
  -                                                           String data)
  -                                                           throws DOMException;
  -  /**
  -   * Creates an <code>Attr</code> of the given name. Note that the 
  -   * <code>Attr</code> instance can then be set on an <code>Element</code> 
  -   * using the <code>setAttribute</code> method. 
  -   * @param name The name of the attribute.
  -   * @return A new <code>Attr</code> object.
  -   * @exception DOMException
  -   *   INVALID_CHARACTER_ERR: Raised if the specified name contains an 
  -   *   invalid character.
  -   */
  -  public Attr               createAttribute(String name)
  -                                            throws DOMException;
  -  /**
  -   * Creates an EntityReference object.
  -   * @param name The name of the entity to reference. 
  -   * @return The new <code>EntityReference</code> object.
  -   * @exception DOMException
  -   *   INVALID_CHARACTER_ERR: Raised if the specified name contains an 
  -   *   invalid character.
  -   *   <br>NOT_SUPPORTED_ERR: Raised if this document is an HTML document. 
  -   */
  -  public EntityReference    createEntityReference(String name)
  -                                                  throws DOMException;
  -  /**
  -   * Returns a <code>NodeList</code> of all the <code>Element</code>s with a 
  -   * given tag name in the order in which they would be encountered in a 
  -   * preorder traversal of the <code>Document</code> tree. 
  -   * @param tagname The name of the tag to match on. The special value "*" 
  -   *   matches all tags.
  -   * @return A new <code>NodeList</code> object containing all the matched 
  -   *   <code>Element</code>s.
  -   */
  -  public NodeList           getElementsByTagName(String tagname);
  +    /**
  +     * Returns a <code>NodeList</code> of all the <code>Elements</code> with a 
  +     * given local name and namespace URI in the order in which they would be 
  +     * encountered in a preorder traversal of the <code>Document</code> tree.
  +     * @since DOM Level 2
  +     * @param namespaceURI The namespace URI of the elements to match on. The 
  +     *   special value "*" matches all namespaces.
  +     * @param localName The local name of the elements to match on. The 
  +     *   special value "*" matches all local names.
  +     * @return A new <code>NodeList</code> object containing all the matched 
  +     *   <code>Elements</code>.
  +     */
  +    public NodeList     getElementsByTagNameNS(String namespaceURI, 
  +                                               String localName);
  +    /**
  +     * Returns the <code>Element</code> whose <code>ID</code> is given by 
  +     * <code>elementId</code>. If no such element exists, returns 
  +     * <code>null</code>. Behavior is not defined if more than one element has
  +     *  this <code>ID</code>. The DOM implementation must have information 
  +     * that says which attributes are of type ID. Attributes with the name 
  +     * "ID" are not of type ID unless so defined. Implementations that do not 
  +     * know whether attributes are of type ID or not are expected to return 
  +     * <code>null</code>.
  +     * @since DOM Level 2
  +     * @param elementId The unique <code>id</code> value for an element.
  +     * @return The matching element.
  +     */
  +    public Element      getElementById(String elementId);
   }
   
  
  
  
  1.2       +23 -22    xml-xerces/java/src/org/w3c/dom/DocumentFragment.java
  
  Index: DocumentFragment.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/DocumentFragment.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DocumentFragment.java	1999/11/09 01:11:23	1.1
  +++ DocumentFragment.java	2000/01/06 22:00:09	1.2
  @@ -1,11 +1,14 @@
  -/** 
  - * ----- 
  - * Copyright (c) World Wide Web Consortium, (Massachusetts Institute of 
  - * Technology, Institut National de Recherche en Informatique et en 
  - * Automatique, Keio University). All Rights Reserved. 
  - * http://www.w3.org/Consortium/Legal/ 
  - * ----- 
  - */ 
  +/*
  + * Copyright (c) 1999 World Wide Web Consortium,
  + * (Massachusetts Institute of Technology, Institut National de
  + * Recherche en Informatique et en Automatique, Keio University). All
  + * Rights Reserved. This program is distributed under the W3C's Software
  + * Intellectual Property License. This program is distributed in the
  + * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
  + * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  + * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
  + * details.
  + */
   
   package org.w3c.dom;
   
  @@ -17,34 +20,32 @@
    * document by moving fragments around. It is desirable to have an object 
    * which can hold such fragments and it is quite natural to use a Node for 
    * this purpose. While it is true that a <code>Document</code> object could 
  - * fulfil this role,  a <code>Document</code> object can potentially be a 
  - * heavyweight  object, depending on the underlying implementation. What is 
  - * really needed for this is a very lightweight object.  
  + * fulfill this role, a <code>Document</code> object can potentially be a 
  + * heavyweight object, depending on the underlying implementation. What is 
  + * really needed for this is a very lightweight object. 
    * <code>DocumentFragment</code> is such an object.
    * <p>Furthermore, various operations -- such as inserting nodes as children 
    * of another <code>Node</code> -- may take <code>DocumentFragment</code> 
    * objects as arguments;  this results in all the child nodes of the 
  - * <code>DocumentFragment</code>  being moved to the child list of this node.
  + * <code>DocumentFragment</code> being moved to the child list of this node.
    * <p>The children of a <code>DocumentFragment</code> node are zero or more 
    * nodes representing the tops of any sub-trees defining the structure of the 
    * document. <code>DocumentFragment</code> nodes do not need to be 
    * well-formed XML documents (although they do need to follow the rules 
    * imposed upon well-formed XML parsed entities, which can have multiple top 
  - * nodes).  For example, a <code>DocumentFragment</code> might have only one 
  + * nodes). For example, a <code>DocumentFragment</code> might have only one 
    * child and that child node could be a <code>Text</code> node. Such a 
  - * structure model  represents neither an HTML document nor a well-formed XML 
  - * document.  
  - * <p>When a <code>DocumentFragment</code> is inserted into a  
  + * structure model represents neither an HTML document nor a well-formed XML 
  + * document.
  + * <p>When a <code>DocumentFragment</code> is inserted into a 
    * <code>Document</code> (or indeed any other <code>Node</code> that may take 
    * children) the children of the <code>DocumentFragment</code> and not the 
  - * <code>DocumentFragment</code>  itself are inserted into the 
  + * <code>DocumentFragment</code> itself are inserted into the 
    * <code>Node</code>. This makes the <code>DocumentFragment</code> very 
    * useful when the user wishes to create nodes that are siblings; the 
  - * <code>DocumentFragment</code> acts as the parent of these nodes so that the
  - *  user can use the standard methods from the <code>Node</code>  interface, 
  - * such as <code>insertBefore()</code> and  <code>appendChild()</code>.  
  - *
  - * @version
  + * <code>DocumentFragment</code> acts as the parent of these nodes so that 
  + * the user can use the standard methods from the <code>Node</code> 
  + * interface, such as <code>insertBefore</code> and <code>appendChild</code>.
    */
   public interface DocumentFragment extends Node {
   }
  
  
  
  1.2       +65 -41    xml-xerces/java/src/org/w3c/dom/DocumentType.java
  
  Index: DocumentType.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/DocumentType.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DocumentType.java	1999/11/09 01:11:23	1.1
  +++ DocumentType.java	2000/01/06 22:00:09	1.2
  @@ -1,51 +1,75 @@
  -/** 
  - * ----- 
  - * Copyright (c) World Wide Web Consortium, (Massachusetts Institute of 
  - * Technology, Institut National de Recherche en Informatique et en 
  - * Automatique, Keio University). All Rights Reserved. 
  - * http://www.w3.org/Consortium/Legal/ 
  - * ----- 
  - */ 
  +/*
  + * Copyright (c) 1999 World Wide Web Consortium,
  + * (Massachusetts Institute of Technology, Institut National de
  + * Recherche en Informatique et en Automatique, Keio University). All
  + * Rights Reserved. This program is distributed under the W3C's Software
  + * Intellectual Property License. This program is distributed in the
  + * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
  + * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  + * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
  + * details.
  + */
   
   package org.w3c.dom;
   
   /**
    * Each <code>Document</code> has a <code>doctype</code> attribute whose value 
    * is either <code>null</code> or a <code>DocumentType</code> object. The 
  - * <code>DocumentType</code> interface in the DOM Level 1 Core provides an 
  - * interface to the list of entities that are defined for the document, and 
  - * little else because the effect of namespaces and the various XML scheme 
  - * efforts on DTD representation are not clearly understood as of this 
  - * writing.
  - * <p>The DOM Level 1 doesn't support editing <code>DocumentType</code> nodes.
  - *
  - * @version
  + * <code>DocumentType</code> interface in the DOM Core provides an interface 
  + * to the list of entities that are defined for the document, and little else 
  + * because the effect of namespaces and the various XML schema efforts on DTD 
  + * representation are not clearly understood as of this writing.
  + * <p>The DOM Level 2 doesn't support editing <code>DocumentType</code> nodes.
    */
   public interface DocumentType extends Node {
  -  /**
  -   * The name of DTD; i.e., the name immediately following the 
  -   * <code>DOCTYPE</code> keyword.
  -   */
  -  public String             getName();
  -  /**
  -   * A <code>NamedNodeMap</code> containing the general entities, both 
  -   * external and internal, declared in the DTD. Duplicates are discarded. 
  -   * For example in:&lt;!DOCTYPE ex SYSTEM "ex.dtd" [ &lt;!ENTITY foo 
  -   * "foo"&gt; &lt;!ENTITY bar "bar"&gt; &lt;!ENTITY % baz "baz"&gt;]&gt;
  -   * &lt;ex/&gt;  the interface provides access to <code>foo</code> and 
  -   * <code>bar</code> but not <code>baz</code>. Every node in this map also 
  -   * implements the <code>Entity</code> interface.
  -   * <br>The DOM Level 1 does not support editing entities, therefore 
  -   * <code>entities</code> cannot be altered in any way.
  -   */
  -  public NamedNodeMap       getEntities();
  -  /**
  -   * A <code>NamedNodeMap</code> containing  the notations declared in the 
  -   * DTD. Duplicates are discarded. Every node in this map also implements 
  -   * the <code>Notation</code> interface.
  -   * <br>The DOM Level 1 does not support editing notations, therefore 
  -   * <code>notations</code> cannot be altered in any way.
  -   */
  -  public NamedNodeMap       getNotations();
  +    /**
  +     * The name of DTD; i.e., the name immediately following the 
  +     * <code>DOCTYPE</code> keyword.
  +     */
  +    public String       getName();
  +    /**
  +     * A <code>NamedNodeMap</code> containing the general entities, both 
  +     * external and internal, declared in the DTD. Parameter entities are not 
  +     *  contained. Duplicates are discarded. For example in:
  +     * <pre>
  +     * &lt;!DOCTYPE ex SYSTEM "ex.dtd" [
  +     *   &lt;!ENTITY foo "foo"&gt;
  +     *   &lt;!ENTITY bar "bar"&gt;
  +     *   &lt;!ENTITY bar "bar2"&gt;
  +     *   &lt;!ENTITY % baz "baz"&gt;
  +     * ]&gt;
  +     * &lt;ex/&gt;</pre>
  +     *   the interface 
  +     * provides access to <code>foo</code> and the first declaration of 
  +     * <code>bar</code> but not the second declaration of  <code>bar</code> 
  +     * or <code>baz</code>. Every node in this map also implements the 
  +     * <code>Entity</code> interface.
  +     * <br>The DOM Level 2 does not support editing entities, therefore 
  +     * <code>entities</code> cannot be altered in any way.
  +     */
  +    public NamedNodeMap getEntities();
  +    /**
  +     * A <code>NamedNodeMap</code> containing  the notations declared in the 
  +     * DTD. Duplicates are discarded. Every node in this map also implements 
  +     * the <code>Notation</code> interface.
  +     * <br>The DOM Level 2 does not support editing notations, therefore 
  +     * <code>notations</code> cannot be altered in any way.
  +     */
  +    public NamedNodeMap getNotations();
  +    /**
  +     * The public identifier of the external subset.
  +     * @since DOM Level 2
  +     */
  +    public String       getPublicId();
  +    /**
  +     * The system identifier of the external subset.
  +     * @since DOM Level 2
  +     */
  +    public String       getSystemId();
  +    /**
  +     * The internal subset as a string.
  +     * @since DOM Level 2
  +     */
  +    public String       getInternalSubset();
   }
   
  
  
  
  1.2       +256 -125  xml-xerces/java/src/org/w3c/dom/Element.java
  
  Index: Element.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/Element.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Element.java	1999/11/09 01:11:23	1.1
  +++ Element.java	2000/01/06 22:00:09	1.2
  @@ -1,28 +1,34 @@
  -/** 
  - * ----- 
  - * Copyright (c) World Wide Web Consortium, (Massachusetts Institute of 
  - * Technology, Institut National de Recherche en Informatique et en 
  - * Automatique, Keio University). All Rights Reserved. 
  - * http://www.w3.org/Consortium/Legal/ 
  - * ----- 
  - */ 
  +/*
  + * Copyright (c) 1999 World Wide Web Consortium,
  + * (Massachusetts Institute of Technology, Institut National de
  + * Recherche en Informatique et en Automatique, Keio University). All
  + * Rights Reserved. This program is distributed under the W3C's Software
  + * Intellectual Property License. This program is distributed in the
  + * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
  + * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  + * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
  + * details.
  + */
   
   package org.w3c.dom;
   
   /**
    * By far the vast majority of objects (apart from text) that authors 
    * encounter when traversing a document are <code>Element</code> nodes.  
  - * Assume the following XML document:&lt;elementExample id="demo"&gt; 
  - * &lt;subelement1/&gt; 
  - * &lt;subelement2&gt;&lt;subsubelement/&gt;&lt;/subelement2&gt;
  - * &lt;/elementExample&gt;  
  - * <p>When represented using DOM, the top node is an <code>Element</code> node 
  - * for "elementExample", which contains two child <code>Element</code> nodes, 
  - * one for "subelement1" and one for "subelement2". "subelement1" contains no 
  - * child nodes.
  + * Assume the following XML document:
  + * <pre>
  + * &lt;elementExample id="demo"&gt;
  + *   &lt;subelement1/&gt;
  + *   &lt;subelement2&gt;&lt;subsubelement/&gt;&lt;/subelement2&gt;
  + * &lt;/elementExample&gt;  </pre>
  + *  
  + * <p>When represented using DOM, the top node is a <code>Document</code> node 
  + * containing an <code>Element</code> node for "elementExample" which 
  + * contains two child <code>Element</code> nodes, one for "subelement1" and 
  + * one for "subelement2". "subelement1" contains no child nodes.
    * <p>Elements may have attributes associated with them; since the 
    * <code>Element</code> interface inherits from <code>Node</code>, the generic
  - *  <code>Node</code> interface method <code>getAttributes</code> may be used 
  + *  <code>Node</code> interface attribute <code>attributes</code> may be used 
    * to retrieve the set of all attributes for an element.  There are methods on
    *  the <code>Element</code> interface to retrieve either an <code>Attr</code>
    *  object by name or an attribute value by name. In XML, where an attribute 
  @@ -30,117 +36,242 @@
    * retrieved to examine the possibly fairly complex sub-tree representing the 
    * attribute value. On the other hand, in HTML, where all attributes have 
    * simple string values, methods to directly access an attribute value can 
  - * safely be used as a convenience.
  - *
  - * @version
  + * safely be used as a convenience.In DOM Level 2, the method 
  + * <code>normalize</code> is inherited from the <code>Node</code> interface 
  + * where it was moved.
    */
   public interface Element extends Node {
  -  /**
  -   * The name of the element. For example, in: &lt;elementExample 
  -   * id="demo"&gt;  ... &lt;/elementExample&gt; , <code>tagName</code> has 
  -   * the value <code>"elementExample"</code>. Note that this is 
  -   * case-preserving in XML, as are all of the operations of the DOM. The 
  -   * HTML DOM returns the <code>tagName</code> of an HTML element in the 
  -   * canonical uppercase form, regardless of the case in the  source HTML 
  -   * document. 
  -   */
  -  public String             getTagName();
  -  /**
  -   * Retrieves an attribute value by name.
  -   * @param name The name of the attribute to retrieve.
  -   * @return The <code>Attr</code> value as a string, or the empty  string if 
  -   *   that attribute does not have a specified or default value.
  -   */
  -  public String             getAttribute(String name);
  -  /**
  -   * Adds a new attribute. If an attribute with that name is already present 
  -   * in the element, its value is changed to be that of the value parameter. 
  -   * This value is a simple string, it is not parsed as it is being set. So 
  -   * any markup (such as syntax to be recognized as an entity reference) is 
  -   * treated as literal text, and needs to be appropriately escaped by the 
  -   * implementation when it is written out. In order to assign an attribute 
  -   * value that contains entity references, the user must create an 
  -   * <code>Attr</code> node plus any <code>Text</code> and 
  -   * <code>EntityReference</code> nodes, build the appropriate subtree, and 
  -   * use <code>setAttributeNode</code> to assign it as the value of an 
  -   * attribute.
  -   * @param name The name of the attribute to create or alter.
  -   * @param value Value to set in string form.
  -   * @exception DOMException
  -   *   INVALID_CHARACTER_ERR: Raised if the specified name contains an 
  -   *   invalid character.
  -   *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
  -   */
  -  public void               setAttribute(String name, 
  -                                         String value)
  +    /**
  +     * The name of the element. For example, in: 
  +     * <pre>
  +     * &lt;elementExample id="demo"&gt; 
  +     *         ... 
  +     * &lt;/elementExample&gt; ,</pre>
  +     *  <code>tagName</code> has the 
  +     * value <code>"elementExample"</code>. Note that this is case-preserving 
  +     * in XML, as are all of the operations of the DOM. The HTML DOM returns 
  +     * the <code>tagName</code> of an HTML element in the canonical uppercase 
  +     * form, regardless of the case in the  source HTML document. 
  +     */
  +    public String       getTagName();
  +    /**
  +     * Retrieves an attribute value by name.
  +     * @param name The name of the attribute to retrieve.
  +     * @return The <code>Attr</code> value as a string, or the empty string if 
  +     *   that attribute does not have a specified or default value.
  +     */
  +    public String       getAttribute(String name);
  +    /**
  +     * Adds a new attribute. If an attribute with that name is already present 
  +     * in the element, its value is changed to be that of the value 
  +     * parameter. This value is a simple string, it is not parsed as it is 
  +     * being set. So any markup (such as syntax to be recognized as an entity 
  +     * reference) is treated as literal text, and needs to be appropriately 
  +     * escaped by the implementation when it is written out. In order to 
  +     * assign an attribute value that contains entity references, the user 
  +     * must create an <code>Attr</code> node plus any <code>Text</code> and 
  +     * <code>EntityReference</code> nodes, build the appropriate subtree, and 
  +     * use <code>setAttributeNode</code> to assign it as the value of an 
  +     * attribute.
  +     * <br>To set an attribute with a qualified name and namespace URI, use 
  +     * the <code>setAttributeNS</code> method.
  +     * @param name The name of the attribute to create or alter.
  +     * @param value Value to set in string form.
  +     * @exception DOMException
  +     *   INVALID_CHARACTER_ERR: Raised if the specified name contains an 
  +     *   illegal character.
  +     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
  +     */
  +    public void         setAttribute(String name, 
  +                                     String value)
  +                                     throws DOMException;
  +    /**
  +     * Removes an attribute by name. If the removed attribute is known to have 
  +     * a default value, an attribute immediately appears containing the 
  +     * default value as well as the corresponding namespace URI, local name, 
  +     * and prefix when applicable.
  +     * <br>To remove an attribute by local name and namespace URI, use the 
  +     * <code>removeAttributeNS</code> method.
  +     * @param name The name of the attribute to remove.
  +     * @exception DOMException
  +     *   NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
  +     */
  +    public void         removeAttribute(String name)
  +                                        throws DOMException;
  +    /**
  +     * Retrieves an attribute node by name.
  +     * <br>To retrieve an attribute node by qualified name and namespace URI, 
  +     * use the <code>getAttributeNodeNS</code> method.
  +     * @param name The name (<code>nodeName</code>) of the attribute to 
  +     *   retrieve.
  +     * @return The <code>Attr</code> node with the specified name (
  +     *   <code>nodeName</code>) or <code>null</code> if there is no such 
  +     *   attribute.
  +     */
  +    public Attr         getAttributeNode(String name);
  +    /**
  +     * Adds a new attribute node. If an attribute with that name (
  +     * <code>nodeName</code>) is already present in the element, it is 
  +     * replaced by the new one.
  +     * <br>To add a new attribute node with a qualified name and namespace URI,
  +     *  use the <code>setAttributeNodeNS</code> method.
  +     * @param newAttr The <code>Attr</code> node to add to the attribute list.
  +     * @return If the <code>newAttr</code> attribute replaces an existing 
  +     *   attribute, the replaced <code>Attr</code> node is returned, 
  +     *   otherwise <code>null</code> is returned.
  +     * @exception DOMException
  +     *   WRONG_DOCUMENT_ERR: Raised if <code>newAttr</code> was created from 
  +     *   a different document than the one that created the element.
  +     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
  +     *   <br>INUSE_ATTRIBUTE_ERR: Raised if <code>newAttr</code> is already 
  +     *   an attribute of another <code>Element</code> object. The DOM user 
  +     *   must explicitly clone <code>Attr</code> nodes to re-use them in 
  +     *   other elements.
  +     */
  +    public Attr         setAttributeNode(Attr newAttr)
                                            throws DOMException;
  -  /**
  -   * Removes an attribute by name. If the removed attribute has a default 
  -   * value it is immediately replaced.
  -   * @param name The name of the attribute to remove.
  -   * @exception DOMException
  -   *   NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
  -   */
  -  public void               removeAttribute(String name)
  +    /**
  +     * Removes the specified attribute node. If the removed <code>Attr</code> 
  +     * has a default value it is immediately replaced. The replacing 
  +     * attribute has the same namespace URI and local name, as well as the 
  +     * original prefix, when applicable.
  +     * @param oldAttr The <code>Attr</code> node to remove from the attribute 
  +     *   list.
  +     * @return The <code>Attr</code> node that was removed.
  +     * @exception DOMException
  +     *   NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
  +     *   <br>NOT_FOUND_ERR: Raised if <code>oldAttr</code> is not an 
  +     *   attribute of the element.
  +     */
  +    public Attr         removeAttributeNode(Attr oldAttr)
                                               throws DOMException;
  -  /**
  -   * Retrieves an <code>Attr</code> node by name.
  -   * @param name The name of the attribute to retrieve.
  -   * @return The <code>Attr</code> node with the specified attribute name or 
  -   *   <code>null</code> if there is no such attribute.
  -   */
  -  public Attr               getAttributeNode(String name);
  -  /**
  -   * Adds a new attribute. If an attribute with that name is already present 
  -   * in the element, it is replaced by the new one.
  -   * @param newAttr The <code>Attr</code> node to add to the attribute list.
  -   * @return If the <code>newAttr</code> attribute replaces an existing 
  -   *   attribute with the same name, the  previously existing 
  -   *   <code>Attr</code> node is returned, otherwise <code>null</code> is 
  -   *   returned.
  -   * @exception DOMException
  -   *   WRONG_DOCUMENT_ERR: Raised if <code>newAttr</code> was created from a 
  -   *   different document than the one that created the element.
  -   *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
  -   *   <br>INUSE_ATTRIBUTE_ERR: Raised if <code>newAttr</code> is already an 
  -   *   attribute of another <code>Element</code> object. The DOM user must 
  -   *   explicitly clone <code>Attr</code> nodes to re-use them in other 
  -   *   elements.
  -   */
  -  public Attr               setAttributeNode(Attr newAttr)
  -                                             throws DOMException;
  -  /**
  -   * Removes the specified attribute.
  -   * @param oldAttr The <code>Attr</code> node to remove from the attribute 
  -   *   list. If the removed <code>Attr</code> has a default value it is 
  -   *   immediately replaced.
  -   * @return The <code>Attr</code> node that was removed.
  -   * @exception DOMException
  -   *   NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
  -   *   <br>NOT_FOUND_ERR: Raised if <code>oldAttr</code> is not an attribute 
  -   *   of the element.
  -   */
  -  public Attr               removeAttributeNode(Attr oldAttr)
  -                                                throws DOMException;
  -  /**
  -   * Returns a <code>NodeList</code> of all descendant elements with a given 
  -   * tag name, in the order in which they would be encountered in a preorder 
  -   * traversal of the <code>Element</code> tree.
  -   * @param name The name of the tag to match on. The special value "*" 
  -   *   matches all tags.
  -   * @return A list of matching <code>Element</code> nodes.
  -   */
  -  public NodeList           getElementsByTagName(String name);
  -  /**
  -   * Puts all <code>Text</code> nodes in the full depth of the sub-tree 
  -   * underneath this <code>Element</code> into a "normal" form where only 
  -   * markup (e.g., tags, comments, processing instructions, CDATA sections, 
  -   * and entity references) separates <code>Text</code> nodes, i.e., there 
  -   * are no adjacent <code>Text</code> nodes.  This can be used to ensure 
  -   * that the DOM view of a document is the same as if it were saved and 
  -   * re-loaded, and is useful when operations (such as XPointer lookups) that 
  -   * depend on a particular document tree structure are to be used.
  -   */
  -  public void               normalize();
  +    /**
  +     * Returns a <code>NodeList</code> of all descendant elements with a given 
  +     * tag name, in the order in which they would be encountered in a 
  +     * preorder traversal of the <code>Element</code> tree.
  +     * @param name The name of the tag to match on. The special value "*" 
  +     *   matches all tags.
  +     * @return A list of matching <code>Element</code> nodes.
  +     */
  +    public NodeList     getElementsByTagName(String name);
  +    /**
  +     * Retrieves an attribute value by local name and namespace URI. HTML-only 
  +     * DOM implementations do not need to implement this method.
  +     * @since DOM Level 2
  +     * @param namespaceURI The namespace URI of the attribute to retrieve.
  +     * @param localName The local name of the attribute to retrieve.
  +     * @return The <code>Attr</code> value as a string, or an empty string if 
  +     *   that attribute does not have a specified or default value.
  +     */
  +    public String       getAttributeNS(String namespaceURI, 
  +                                       String localName);
  +    /**
  +     * Adds a new attribute. If the given <code>namespaceURI</code> is 
  +     * <code>null</code> or an empty string and the <code>qualifiedName</code>
  +     *  has a prefix that is "xml", the new attribute is bound to the 
  +     * predefined namespace "http://www.w3.org/XML/1998/namespace" . If an 
  +     * attribute with the same local name and namespace URI is already 
  +     * present on the element, its prefix is changed to be the prefix part of 
  +     * the <code>qualifiedName</code>, and its value is changed to be the 
  +     * <code>value</code> parameter. This value is a simple string, it is not 
  +     * parsed as it is being set. So any markup (such as syntax to be 
  +     * recognized as an entity reference) is treated as literal text, and 
  +     * needs to be appropriately escaped by the implementation when it is 
  +     * written out. In order to assign an attribute value that contains 
  +     * entity references, the user must create an <code>Attr</code> node plus 
  +     * any <code>Text</code> and <code>EntityReference</code> nodes, build 
  +     * the appropriate subtree, and use <code>setAttributeNodeNS</code> or 
  +     * <code>setAttributeNode</code> to assign it as the value of an 
  +     * attribute.
  +     * <br>HTML-only DOM implementations do not need to implement this method.
  +     * @since DOM Level 2
  +     * @param namespaceURI The namespace URI of the attribute to create or 
  +     *   alter.
  +     * @param qualifiedName The qualified name of the attribute to create or 
  +     *   alter.
  +     * @param value The value to set in string form.
  +     * @exception DOMException
  +     *   INVALID_CHARACTER_ERR: Raised if the specified qualified name 
  +     *   contains an illegal character.
  +     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
  +     *   <br>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is 
  +     *   malformed, if the <code>qualifiedName</code> has a prefix that is 
  +     *   "xml" and the <code>namespaceURI</code> is neither <code>null</code> 
  +     *   nor an empty string nor "http://www.w3.org/XML/1998/namespace", or 
  +     *   if the <code>qualifiedName</code> has a prefix that is "xmlns" but 
  +     *   the <code>namespaceURI</code> is neither <code>null</code> nor an 
  +     *   empty string, or if if the <code>qualifiedName</code> has a prefix 
  +     *   different from "xml" and "xmlns" and the <code>namespaceURI</code> 
  +     *   is <code>null</code> or an empty string.
  +     */
  +    public void         setAttributeNS(String namespaceURI, 
  +                                       String qualifiedName, 
  +                                       String value)
  +                                       throws DOMException;
  +    /**
  +     * Removes an attribute by local name and namespace URI. If the removed 
  +     * attribute has a default value it is immediately replaced. The 
  +     * replacing attribute has the same namespace URI and local name, as well 
  +     * as the original prefix.
  +     * <br>HTML-only DOM implementations do not need to implement this method.
  +     * @since DOM Level 2
  +     * @param namespaceURI The namespace URI of the attribute to remove.
  +     * @param localName The local name of the attribute to remove.
  +     * @exception DOMException
  +     *   NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
  +     */
  +    public void         removeAttributeNS(String namespaceURI, 
  +                                          String localName)
  +                                          throws DOMException;
  +    /**
  +     * Retrieves an <code>Attr</code> node by local name and namespace URI. 
  +     * HTML-only DOM implementations do not need to implement this method.
  +     * @since DOM Level 2
  +     * @param namespaceURI The namespace URI of the attribute to retrieve.
  +     * @param localName The local name of the attribute to retrieve.
  +     * @return The <code>Attr</code> node with the specified attribute local 
  +     *   name and namespace URI or <code>null</code> if there is no such 
  +     *   attribute.
  +     */
  +    public Attr         getAttributeNodeNS(String namespaceURI, 
  +                                           String localName);
  +    /**
  +     * Adds a new attribute. If an attribute with that local name and 
  +     * namespace URI is already present in the element, it is replaced by the 
  +     * new one.
  +     * <br>HTML-only DOM implementations do not need to implement this method.
  +     * @since DOM Level 2
  +     * @param newAttr The <code>Attr</code> node to add to the attribute list.
  +     * @return If the <code>newAttr</code> attribute replaces an existing 
  +     *   attribute with the same local name and namespace URI, the replaced 
  +     *   <code>Attr</code> node is returned, otherwise <code>null</code> is 
  +     *   returned.
  +     * @exception DOMException
  +     *   WRONG_DOCUMENT_ERR: Raised if <code>newAttr</code> was created from 
  +     *   a different document than the one that created the element.
  +     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
  +     *   <br>INUSE_ATTRIBUTE_ERR: Raised if <code>newAttr</code> is already an
  +     *    attribute of another <code>Element</code> object. The DOM user must 
  +     *   explicitly clone <code>Attr</code> nodes to re-use them in other 
  +     *   elements.
  +     */
  +    public Attr         setAttributeNodeNS(Attr newAttr)
  +                                           throws DOMException;
  +    /**
  +     * Returns a <code>NodeList</code> of all the <code>Elements</code> with a 
  +     * given local name and namespace URI in the order in which they would be 
  +     * encountered in a preorder traversal of the <code>Document</code> tree, 
  +     * starting from this node.
  +     * <br>HTML-only DOM implementations do not need to implement this method.
  +     * @since DOM Level 2
  +     * @param namespaceURI The namespace URI of the elements to match on. The 
  +     *   special value "*" matches all namespaces.
  +     * @param localName The local name of the elements to match on. The 
  +     *   special value "*" matches all local names.
  +     * @return A new <code>NodeList</code> object containing all the matched 
  +     *   <code>Elements</code>.
  +     */
  +    public NodeList     getElementsByTagNameNS(String namespaceURI, 
  +                                               String localName);
   }
   
  
  
  
  1.2       +36 -32    xml-xerces/java/src/org/w3c/dom/Entity.java
  
  Index: Entity.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/Entity.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Entity.java	1999/11/09 01:11:23	1.1
  +++ Entity.java	2000/01/06 22:00:09	1.2
  @@ -1,11 +1,14 @@
  -/** 
  - * ----- 
  - * Copyright (c) World Wide Web Consortium, (Massachusetts Institute of 
  - * Technology, Institut National de Recherche en Informatique et en 
  - * Automatique, Keio University). All Rights Reserved. 
  - * http://www.w3.org/Consortium/Legal/ 
  - * ----- 
  - */ 
  +/*
  + * Copyright (c) 1999 World Wide Web Consortium,
  + * (Massachusetts Institute of Technology, Institut National de
  + * Recherche en Informatique et en Automatique, Keio University). All
  + * Rights Reserved. This program is distributed under the W3C's Software
  + * Intellectual Property License. This program is distributed in the
  + * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
  + * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  + * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
  + * details.
  + */
   
   package org.w3c.dom;
   
  @@ -20,42 +23,43 @@
    * structure model is passed to the DOM; in this case there will be no 
    * <code>EntityReference</code> nodes in the document tree.
    * <p>XML does not mandate that a non-validating XML processor read and 
  - * process entity declarations  made in the external subset or declared in 
  + * process entity declarations made in the external subset or declared in 
    * external parameter entities. This means that parsed entities declared in 
    * the external subset need not be expanded by some classes of applications, 
    * and that the replacement value of the entity may not be available. When the
    *  replacement value is available, the corresponding  <code>Entity</code> 
    * node's child list represents the structure of that replacement text. 
    * Otherwise, the child list is empty.
  - * <p>The resolution of the children of the <code>Entity</code> (the  
  - * replacement value) may be lazily evaluated; actions by the user (such as 
  - * calling the <code>childNodes</code> method on the <code>Entity</code> 
  - * Node) are assumed to trigger the evaluation.  
  - * <p>The DOM Level 1 does not support editing <code>Entity</code> nodes; if a 
  + * <p>The DOM Level 2 does not support editing <code>Entity</code> nodes; if a 
    * user wants to make changes to the contents of an <code>Entity</code>, 
    * every related <code>EntityReference</code> node has to be replaced in the 
    * structure model by a clone of the <code>Entity</code>'s contents, and then 
    * the desired changes must be made to each of those clones instead. All the 
    * descendants of an <code>Entity</code> node are readonly.
  - * <p>An <code>Entity</code> node does not have any parent.
  - *
  - * @version
  + * <p>An <code>Entity</code> node does not have any parent.If the entity 
  + * contains an unbound namespace prefix, the <code>namespaceURI</code> of the 
  + * corresponding node in the <code>Entity</code> node subtree is 
  + * <code>null</code>. And the same is true for <code>EntityReference</code> 
  + * nodes that refer to this entity, when they are created using the 
  + * <code>createEntityReference</code> method of the <code>Document</code> 
  + * interface. The DOM Level 2 does not support any mechanism to resolve 
  + * namespace prefixes.
    */
   public interface Entity extends Node {
  -  /**
  -   * The public identifier associated with the entity, if specified. If the 
  -   * public identifier was not specified, this is <code>null</code>.
  -   */
  -  public String             getPublicId();
  -  /**
  -   * The system identifier associated with the entity, if specified. If the 
  -   * system identifier was not specified, this is <code>null</code>.
  -   */
  -  public String             getSystemId();
  -  /**
  -   * For unparsed entities, the name of the notation for the entity. For 
  -   * parsed entities, this is <code>null</code>. 
  -   */
  -  public String             getNotationName();
  +    /**
  +     * The public identifier associated with the entity, if specified. If the 
  +     * public identifier was not specified, this is <code>null</code>.
  +     */
  +    public String       getPublicId();
  +    /**
  +     * The system identifier associated with the entity, if specified. If the 
  +     * system identifier was not specified, this is <code>null</code>.
  +     */
  +    public String       getSystemId();
  +    /**
  +     * For unparsed entities, the name of the notation for the entity. For 
  +     * parsed entities, this is <code>null</code>. 
  +     */
  +    public String       getNotationName();
   }
   
  
  
  
  1.2       +27 -27    xml-xerces/java/src/org/w3c/dom/EntityReference.java
  
  Index: EntityReference.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/EntityReference.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- EntityReference.java	1999/11/09 01:11:24	1.1
  +++ EntityReference.java	2000/01/06 22:00:09	1.2
  @@ -1,37 +1,37 @@
  -/** 
  - * ----- 
  - * Copyright (c) World Wide Web Consortium, (Massachusetts Institute of 
  - * Technology, Institut National de Recherche en Informatique et en 
  - * Automatique, Keio University). All Rights Reserved. 
  - * http://www.w3.org/Consortium/Legal/ 
  - * ----- 
  - */ 
  +/*
  + * Copyright (c) 1999 World Wide Web Consortium,
  + * (Massachusetts Institute of Technology, Institut National de
  + * Recherche en Informatique et en Automatique, Keio University). All
  + * Rights Reserved. This program is distributed under the W3C's Software
  + * Intellectual Property License. This program is distributed in the
  + * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
  + * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  + * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
  + * details.
  + */
   
   package org.w3c.dom;
   
   /**
  - *  <code>EntityReference</code> objects may be inserted into the structure 
  + * <code>EntityReference</code> objects may be inserted into the structure 
    * model when an entity reference is in the source document, or when the user 
  - * wishes to insert an entity reference. Note that  character references and 
  + * wishes to insert an entity reference. Note that character references and 
    * references to predefined entities are considered to be expanded by the 
    * HTML or XML processor so that characters are represented by their Unicode 
  - * equivalent rather than by an entity reference. Moreover, the XML  
  - * processor may completely expand references to entities while building the 
  - * structure model, instead of providing <code>EntityReference</code> 
  - * objects. If it does provide such objects, then for a given 
  - * <code>EntityReference</code> node, it may be that there is no 
  - * <code>Entity</code> node representing the referenced entity; but if such 
  - * an <code>Entity</code> exists, then the child list of the 
  - * <code>EntityReference</code> node is the same as that of the 
  - * <code>Entity</code> node. As with the <code>Entity</code> node, all 
  - * descendants of the <code>EntityReference</code> are readonly.
  - * <p>The resolution of the children of the <code>EntityReference</code> (the  
  - * replacement value of the referenced <code>Entity</code>) may be lazily  
  - * evaluated; actions by the user (such as calling the  
  - * <code>childNodes</code> method on the <code>EntityReference</code> node)  
  - * are assumed to trigger the evaluation.
  - *
  - * @version
  + * equivalent rather than by an entity reference. Moreover, the XML processor 
  + * may completely expand references to entities while building the structure 
  + * model, instead of providing <code>EntityReference</code> objects. If it 
  + * does provide such objects, then for a given <code>EntityReference</code> 
  + * node, it may be that there is no <code>Entity</code> node representing the 
  + * referenced entity; but if such an <code>Entity</code> exists, then the 
  + * child list of the <code>EntityReference</code> node is in general the same 
  + * as that of the <code>Entity</code> node. They may differ when an entity 
  + * contains an unbound namespace prefix. In such a case, because the 
  + * namespace prefix resolution depends on where the entity reference is, the 
  + * descendants of the <code>EntityReference</code> node may be bound to 
  + * different namespace URIs.
  + * <p>As with the <code>Entity</code> node, all descendants of the 
  + * <code>EntityReference</code> are readonly.
    */
   public interface EntityReference extends Node {
   }
  
  
  
  1.2       +0 -3      xml-xerces/java/src/org/w3c/dom/Makefile
  
  Index: Makefile
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/Makefile,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Makefile	1999/11/09 01:11:24	1.1
  +++ Makefile	2000/01/06 22:00:09	1.2
  @@ -1,4 +1,3 @@
  -include ../../../../src/Makefile.incl
   # Makefile for directory ./org/w3c/dom
   #
   # This makefile depends on the following environment variables
  @@ -42,8 +41,6 @@
   
   .java.class:
   	${JAVAC} $<
  -
  -	touch ../../../../src/classfiles_updated
   
   clean:
   	${RM} *.class
  
  
  
  1.2       +141 -72   xml-xerces/java/src/org/w3c/dom/NamedNodeMap.java
  
  Index: NamedNodeMap.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/NamedNodeMap.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- NamedNodeMap.java	1999/11/09 01:11:24	1.1
  +++ NamedNodeMap.java	2000/01/06 22:00:09	1.2
  @@ -1,11 +1,14 @@
  -/** 
  - * ----- 
  - * Copyright (c) World Wide Web Consortium, (Massachusetts Institute of 
  - * Technology, Institut National de Recherche en Informatique et en 
  - * Automatique, Keio University). All Rights Reserved. 
  - * http://www.w3.org/Consortium/Legal/ 
  - * ----- 
  - */ 
  +/*
  + * Copyright (c) 1999 World Wide Web Consortium,
  + * (Massachusetts Institute of Technology, Institut National de
  + * Recherche en Informatique et en Automatique, Keio University). All
  + * Rights Reserved. This program is distributed under the W3C's Software
  + * Intellectual Property License. This program is distributed in the
  + * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
  + * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  + * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
  + * details.
  + */
   
   package org.w3c.dom;
   
  @@ -13,75 +16,141 @@
    * Objects implementing the <code>NamedNodeMap</code> interface are used to 
    * represent collections of nodes that can be accessed by name. Note that 
    * <code>NamedNodeMap</code> does not inherit from <code>NodeList</code>; 
  - * <code>NamedNodeMap</code>s are not maintained in any particular order. 
  + * <code>NamedNodeMaps</code> are not maintained in any particular order. 
    * Objects contained in an object implementing <code>NamedNodeMap</code> may 
    * also be accessed by an ordinal index, but this is simply to allow 
    * convenient enumeration of the contents of a <code>NamedNodeMap</code>, and 
    * does not imply that the DOM specifies an order to these Nodes. 
  - *
  - * @version
    */
   public interface NamedNodeMap {
  -  /**
  -   * Retrieves a node specified by name.
  -   * @param name Name of a node to retrieve.
  -   * @return A <code>Node</code> (of any type) with the specified name, or 
  -   *   <code>null</code> if the specified name did not identify any node in 
  -   *   the map. 
  -   */
  -  public Node               getNamedItem(String name);
  -  /**
  -   * Adds a node using its <code>nodeName</code> attribute. 
  -   * <br>As the <code>nodeName</code> attribute is used to derive the name 
  -   * which the node must be stored under, multiple nodes of certain types 
  -   * (those that have a "special" string value) cannot be stored as the names 
  -   * would clash. This is seen as preferable to allowing nodes to be aliased.
  -   * @param arg A node to store in a named node map. The node will later be 
  -   *   accessible using the value of the <code>nodeName</code> attribute of 
  -   *   the node. If a node with that name is already present in the map, it 
  -   *   is replaced by the new one.
  -   * @return If the new <code>Node</code> replaces an existing node with the 
  -   *   same name  the previously existing <code>Node</code> is returned, 
  -   *   otherwise <code>null</code> is returned.
  -   * @exception DOMException
  -   *   WRONG_DOCUMENT_ERR: Raised if <code>arg</code> was created from a 
  -   *   different document than the one that created the 
  -   *   <code>NamedNodeMap</code>.
  -   *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this 
  -   *   <code>NamedNodeMap</code> is readonly.
  -   *   <br>INUSE_ATTRIBUTE_ERR: Raised if <code>arg</code> is an 
  -   *   <code>Attr</code> that is already an attribute of another 
  -   *   <code>Element</code> object. The DOM user must explicitly clone 
  -   *   <code>Attr</code> nodes to re-use them in other elements.
  -   */
  -  public Node               setNamedItem(Node arg)
  -                                         throws DOMException;
  -  /**
  -   * Removes a node specified by name. If the removed node is an 
  -   * <code>Attr</code> with a default value it is immediately replaced.
  -   * @param name The name of a node to remove.
  -   * @return The node removed from the map or <code>null</code> if no node 
  -   *   with such a name exists.
  -   * @exception DOMException
  -   *   NOT_FOUND_ERR: Raised if there is no node named <code>name</code> in 
  -   *   the map.
  -   */
  -  public Node               removeNamedItem(String name)
  -                                            throws DOMException;
  -  /**
  -   * Returns the <code>index</code>th item in the map. If <code>index</code> 
  -   * is greater than or equal to the number of nodes in the map, this returns 
  -   * <code>null</code>.
  -   * @param index Index into the map.
  -   * @return The node at the <code>index</code>th position in the 
  -   *   <code>NamedNodeMap</code>, or <code>null</code> if that is not a valid 
  -   *   index.
  -   */
  -  public Node               item(int index);
  -  /**
  -   * The number of nodes in the map. The range of valid child node indices is 
  -   * 0 to <code>length-1</code> inclusive. 
  -   */
  -  public int                getLength();
  +    /**
  +     * Retrieves a node specified by name.
  +     * @param name The <code>nodeName</code> of a node to retrieve.
  +     * @return A <code>Node</code> (of any type) with the specified 
  +     *   <code>nodeName</code>, or <code>null</code> if it does not identify 
  +     *   any node in the map.
  +     */
  +    public Node         getNamedItem(String name);
  +    /**
  +     * Adds a node using its <code>nodeName</code> attribute.
  +     * <br>As the <code>nodeName</code> attribute is used to derive the name 
  +     * which the node must be stored under, multiple nodes of certain types 
  +     * (those that have a "special" string value) cannot be stored as the 
  +     * names would clash. This is seen as preferable to allowing nodes to be 
  +     * aliased.
  +     * @param arg A node to store in a named node map. The node will later be 
  +     *   accessible using the value of the <code>nodeName</code> attribute of 
  +     *   the node. If a node with that name is already present in the map, it 
  +     *   is replaced	by the new one.
  +     * @return If the new <code>Node</code> replaces an existing node the 
  +     *   replaced <code>Node</code> is returned, otherwise <code>null</code> 
  +     *   is returned.
  +     * @exception DOMException
  +     *   WRONG_DOCUMENT_ERR: Raised if <code>arg</code> was created from a 
  +     *   different document than the one that created the 
  +     *   <code>NamedNodeMap</code>.
  +     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this 
  +     *   <code>NamedNodeMap</code> is readonly.
  +     *   <br>INUSE_ATTRIBUTE_ERR: Raised if <code>arg</code> is an 
  +     *   <code>Attr</code> that is already an attribute of another 
  +     *   <code>Element</code> object. The DOM user must explicitly clone 
  +     *   <code>Attr</code> nodes to re-use them in other elements.
  +     */
  +    public Node         setNamedItem(Node arg)
  +                                     throws DOMException;
  +    /**
  +     * Removes a node specified by name.
  +     * @param name The <code>nodeName</code> of the node to remove. When this 
  +     *   <code>NamedNodeMap</code> contains the attributes attached to an 
  +     *   element, as returned by the attributes attribute of the 
  +     *   <code>Node</code> interface, if the removed attribute is known to 
  +     *   have a default value, an attribute immediately appears containing the
  +     *    default value as well as the corresponding namespace URI, local 
  +     *   name, and prefix when applicable.
  +     * @return The node removed from the map if a node with such a name exists.
  +     * @exception DOMException
  +     *   NOT_FOUND_ERR: Raised if there is no node named <code>name</code> in 
  +     *   the map.
  +     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this 
  +     *   <code>NamedNodeMap</code> is readonly.
  +     */
  +    public Node         removeNamedItem(String name)
  +                                        throws DOMException;
  +    /**
  +     * Returns the <code>index</code>th item in the map. If <code>index</code> 
  +     * is greater than or equal to the number of nodes in the map, this 
  +     * returns <code>null</code>.
  +     * @param index Index into the map.
  +     * @return The node at the <code>index</code>th position in the 
  +     *   <code>NamedNodeMap</code>, or <code>null</code> if that is not a 
  +     *   valid index.
  +     */
  +    public Node         item(int index);
  +    /**
  +     * The number of nodes in the map. The range of valid child node indices 
  +     * is 0 to <code>length-1</code> inclusive. 
  +     */
  +    public int          getLength();
  +    /**
  +     * Retrieves a node specified by local name and namespace URI. HTML-only 
  +     * DOM implementations do not need to implement this method.
  +     * @since DOM Level 2
  +     * @param namespaceURI The namespace URI of the node to retrieve.
  +     * @param localName The local name of the node to retrieve.
  +     * @return A <code>Node</code> (of any type) with the specified local name 
  +     *   and namespace URI, or <code>null</code> if they do not identify any 
  +     *   node in the map.
  +     */
  +    public Node         getNamedItemNS(String namespaceURI, 
  +                                       String localName);
  +    /**
  +     * Adds a node using its <code>namespaceURI</code> and 
  +     * <code>localName</code>. HTML-only DOM implementations do not need to 
  +     * implement this method.
  +     * @since DOM Level 2
  +     * @param arg A node to store in a named node map. The node will later be 
  +     *   accessible using the value of the <code>namespaceURI</code> and 
  +     *   <code>localName</code> attribute of the node. If a node with those 
  +     *   namespace URI and local name is already present in the map, it is 
  +     *   replaced by the new one.
  +     * @return If the new <code>Node</code> replaces an existing node the 
  +     *   replaced <code>Node</code> is returned, otherwise <code>null</code> 
  +     *   is returned.
  +     * @exception DOMException
  +     *   WRONG_DOCUMENT_ERR: Raised if <code>arg</code> was created from a 
  +     *   different document than the one that created the 
  +     *   <code>NamedNodeMap</code>.
  +     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this 
  +     *   <code>NamedNodeMap</code> is readonly.
  +     *   <br>INUSE_ATTRIBUTE_ERR: Raised if <code>arg</code> is an 
  +     *   <code>Attr</code> that is already an attribute of another 
  +     *   <code>Element</code> object. The DOM user must explicitly clone 
  +     *   <code>Attr</code> nodes to re-use them in other elements.
  +     */
  +    public Node         setNamedItemNS(Node arg)
  +                                       throws DOMException;
  +    /**
  +     * Removes a node specified by local name and namespace URI. HTML-only DOM 
  +     * implementations do not need to implement this method.
  +     * @since DOM Level 2
  +     * @param namespaceURI The namespace URI of the node to remove.
  +     * @param localName The local name of the node to remove. When this 
  +     *   <code>NamedNodeMap</code> contains the attributes attached to an 
  +     *   element, as returned by the attributes attribute of the 
  +     *   <code>Node</code> interface, if the removed attribute is known to 
  +     *   have a default value, an attribute immediately appears containing 
  +     *   the default value as well as the corresponding namespace URI, local 
  +     *   name, and prefix.
  +     * @return The node removed from the map if a node with such a local name 
  +     *   and namespace URI exists.
  +     * @exception DOMException
  +     *   NOT_FOUND_ERR: Raised if there is no node named <code>name</code> in 
  +     *   the map.
  +     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this 
  +     *   <code>NamedNodeMap</code> is readonly.
  +     */
  +    public Node         removeNamedItemNS(String namespaceURI, 
  +                                          String localName)
  +                                          throws DOMException;
   }
   
  
  
  
  1.2       +300 -201  xml-xerces/java/src/org/w3c/dom/Node.java
  
  Index: Node.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/Node.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Node.java	1999/11/09 01:11:26	1.1
  +++ Node.java	2000/01/06 22:00:09	1.2
  @@ -1,11 +1,14 @@
  -/** 
  - * ----- 
  - * Copyright (c) World Wide Web Consortium, (Massachusetts Institute of 
  - * Technology, Institut National de Recherche en Informatique et en 
  - * Automatique, Keio University). All Rights Reserved. 
  - * http://www.w3.org/Consortium/Legal/ 
  - * ----- 
  - */ 
  +/*
  + * Copyright (c) 1999 World Wide Web Consortium,
  + * (Massachusetts Institute of Technology, Institut National de
  + * Recherche en Informatique et en Automatique, Keio University). All
  + * Rights Reserved. This program is distributed under the W3C's Software
  + * Intellectual Property License. This program is distributed in the
  + * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
  + * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  + * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
  + * details.
  + */
   
   package org.w3c.dom;
   
  @@ -16,201 +19,297 @@
    * methods for dealing with children, not all objects implementing the 
    * <code>Node</code> interface may have children. For example, 
    * <code>Text</code> nodes may not have children, and adding children to such 
  - * nodes results in a <code>DOMException</code> being raised.  
  - * <p>The attributes <code>nodeName</code>, <code>nodeValue</code>  and 
  - * <code>attributes</code> are  included as a mechanism to get at node 
  - * information without  casting down to the specific derived interface. In 
  - * cases where  there is no obvious mapping of these attributes for a specific
  - *  <code>nodeType</code> (e.g., <code>nodeValue</code> for an Element  or 
  - * <code>attributes</code>  for a Comment), this returns <code>null</code>. 
  - * Note that the  specialized interfaces may contain additional and more 
  - * convenient mechanisms to get and set the relevant information.
  - *
  - * @version
  + * nodes results in a <code>DOMException</code> being raised.
  + * <p>The attributes <code>nodeName</code>, <code>nodeValue</code> and 
  + * <code>attributes</code> are included as a mechanism to get at node 
  + * information without casting down to the specific derived interface. In 
  + * cases where there is no obvious mapping of these attributes for a specific 
  + * <code>nodeType</code> (e.g., <code>nodeValue</code> for an 
  + * <code>Element</code> or <code>attributes</code> for a <code>Comment</code>
  + * ), this returns <code>null</code>. Note that the specialized interfaces 
  + * may contain additional and more convenient mechanisms to get and set the 
  + * relevant information.
    */
   public interface Node {
  -  // NodeType
  -  public static final short           ELEMENT_NODE         = 1;
  -  public static final short           ATTRIBUTE_NODE       = 2;
  -  public static final short           TEXT_NODE            = 3;
  -  public static final short           CDATA_SECTION_NODE   = 4;
  -  public static final short           ENTITY_REFERENCE_NODE = 5;
  -  public static final short           ENTITY_NODE          = 6;
  -  public static final short           PROCESSING_INSTRUCTION_NODE = 7;
  -  public static final short           COMMENT_NODE         = 8;
  -  public static final short           DOCUMENT_NODE        = 9;
  -  public static final short           DOCUMENT_TYPE_NODE   = 10;
  -  public static final short           DOCUMENT_FRAGMENT_NODE = 11;
  -  public static final short           NOTATION_NODE        = 12;
  +    // NodeType
  +    public static final short   ELEMENT_NODE              = 1;
  +    public static final short   ATTRIBUTE_NODE            = 2;
  +    public static final short   TEXT_NODE                 = 3;
  +    public static final short   CDATA_SECTION_NODE        = 4;
  +    public static final short   ENTITY_REFERENCE_NODE     = 5;
  +    public static final short   ENTITY_NODE               = 6;
  +    public static final short   PROCESSING_INSTRUCTION_NODE = 7;
  +    public static final short   COMMENT_NODE              = 8;
  +    public static final short   DOCUMENT_NODE             = 9;
  +    public static final short   DOCUMENT_TYPE_NODE        = 10;
  +    public static final short   DOCUMENT_FRAGMENT_NODE    = 11;
  +    public static final short   NOTATION_NODE             = 12;
   
  -  /**
  -   * The name of this node, depending on its type; see the table above. 
  -   */
  -  public String             getNodeName();
  -  /**
  -   * The value of this node, depending on its type; see the table above.
  -   * @exception DOMException
  -   *   NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
  -   * @exception DOMException
  -   *   DOMSTRING_SIZE_ERR: Raised when it would return more characters than 
  -   *   fit in a <code>DOMString</code> variable on the implementation 
  -   *   platform.
  -   */
  -  public String             getNodeValue()
  -                                                 throws DOMException;
  -  public void               setNodeValue(String nodeValue)
  -                                                 throws DOMException;
  -  /**
  -   * A code representing the type of the underlying object, as defined above.
  -   */
  -  public short              getNodeType();
  -  /**
  -   * The parent of this node. All nodes, except <code>Document</code>, 
  -   * <code>DocumentFragment</code>, and <code>Attr</code> may have a parent. 
  -   * However, if a node has just been created and not yet added to the tree, 
  -   * or if it has been removed from the tree, this is <code>null</code>.
  -   */
  -  public Node               getParentNode();
  -  /**
  -   * A <code>NodeList</code> that contains all children of this node. If there 
  -   * are no children, this is a <code>NodeList</code> containing no nodes. 
  -   * The content of the returned <code>NodeList</code> is "live" in the sense 
  -   * that, for instance, changes to the children of the node object that 
  -   * it was created from are immediately reflected in the nodes returned by 
  -   * the <code>NodeList</code> accessors; it is not a static snapshot of the 
  -   * content of the node. This is true for every <code>NodeList</code>, 
  -   * including the ones returned by the <code>getElementsByTagName</code> 
  -   * method.
  -   */
  -  public NodeList           getChildNodes();
  -  /**
  -   * The first child of this node. If there is no such node, this returns 
  -   * <code>null</code>.
  -   */
  -  public Node               getFirstChild();
  -  /**
  -   * The last child of this node. If there is no such node, this returns 
  -   * <code>null</code>.
  -   */
  -  public Node               getLastChild();
  -  /**
  -   * The node immediately preceding this node. If there is no such node, this 
  -   * returns <code>null</code>.
  -   */
  -  public Node               getPreviousSibling();
  -  /**
  -   * The node immediately following this node. If there is no such node, this 
  -   * returns <code>null</code>.
  -   */
  -  public Node               getNextSibling();
  -  /**
  -   * A <code>NamedNodeMap</code> containing the attributes of this node (if it 
  -   * is an <code>Element</code>) or <code>null</code> otherwise. 
  -   */
  -  public NamedNodeMap       getAttributes();
  -  /**
  -   * The <code>Document</code> object associated with this node. This is also 
  -   * the <code>Document</code> object used to create new nodes. When this 
  -   * node is a <code>Document</code> this is <code>null</code>.
  -   */
  -  public Document           getOwnerDocument();
  -  /**
  -   * Inserts the node <code>newChild</code> before the existing child node 
  -   * <code>refChild</code>. If <code>refChild</code> is <code>null</code>, 
  -   * insert <code>newChild</code> at the end of the list of children.
  -   * <br>If <code>newChild</code> is a <code>DocumentFragment</code> object, 
  -   * all of its children are inserted, in the same order, before 
  -   * <code>refChild</code>. If the <code>newChild</code> is already in the 
  -   * tree, it is first removed.
  -   * @param newChild The node to insert.
  -   * @param refChild The reference node, i.e., the node before which the new 
  -   *   node must be inserted.
  -   * @return The node being inserted.
  -   * @exception DOMException
  -   *   HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not 
  -   *   allow children of the type of the <code>newChild</code> node, or if 
  -   *   the node to insert is one of this node's ancestors.
  -   *   <br>WRONG_DOCUMENT_ERR: Raised if <code>newChild</code> was created 
  -   *   from a different document than the one that created this node.
  -   *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
  -   *   <br>NOT_FOUND_ERR: Raised if <code>refChild</code> is not a child of 
  -   *   this node.
  -   */
  -  public Node               insertBefore(Node newChild, 
  -                                         Node refChild)
  -                                         throws DOMException;
  -  /**
  -   * Replaces the child node <code>oldChild</code> with <code>newChild</code> 
  -   * in the list of children, and returns the <code>oldChild</code> node. If 
  -   * the <code>newChild</code> is already in the tree, it is first removed.
  -   * @param newChild The new node to put in the child list.
  -   * @param oldChild The node being replaced in the list.
  -   * @return The node replaced.
  -   * @exception DOMException
  -   *   HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not 
  -   *   allow children of the type of the <code>newChild</code> node, or it 
  -   *   the node to put in is one of this node's ancestors.
  -   *   <br>WRONG_DOCUMENT_ERR: Raised if <code>newChild</code> was created 
  -   *   from a different document than the one that created this node.
  -   *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
  -   *   <br>NOT_FOUND_ERR: Raised if <code>oldChild</code> is not a child of 
  -   *   this node.
  -   */
  -  public Node               replaceChild(Node newChild, 
  -                                         Node oldChild)
  -                                         throws DOMException;
  -  /**
  -   * Removes the child node indicated by <code>oldChild</code> from the list 
  -   * of children, and returns it.
  -   * @param oldChild The node being removed.
  -   * @return The node removed.
  -   * @exception DOMException
  -   *   NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
  -   *   <br>NOT_FOUND_ERR: Raised if <code>oldChild</code> is not a child of 
  -   *   this node.
  -   */
  -  public Node               removeChild(Node oldChild)
  -                                        throws DOMException;
  -  /**
  -   * Adds the node <code>newChild</code> to the end of the list of children of 
  -   * this node. If the <code>newChild</code> is already in the tree, it is 
  -   * first removed.
  -   * @param newChild The node to add.If it is a  <code>DocumentFragment</code> 
  -   *   object, the entire contents of the document fragment are moved into 
  -   *   the child list of this node
  -   * @return The node added.
  -   * @exception DOMException
  -   *   HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not 
  -   *   allow children of the type of the <code>newChild</code> node, or if 
  -   *   the node to append is one of this node's ancestors.
  -   *   <br>WRONG_DOCUMENT_ERR: Raised if <code>newChild</code> was created 
  -   *   from a different document than the one that created this node.
  -   *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
  -   */
  -  public Node               appendChild(Node newChild)
  -                                        throws DOMException;
  -  /**
  -   *  This is a convenience method to allow easy determination of whether a 
  -   * node has any children.
  -   * @return  <code>true</code> if the node has any children, 
  -   *   <code>false</code> if the node has no children.
  -   */
  -  public boolean            hasChildNodes();
  -  /**
  -   * Returns a duplicate of this node, i.e., serves as a generic copy 
  -   * constructor for nodes. The duplicate node has no parent (
  -   * <code>parentNode</code> returns <code>null</code>.).
  -   * <br>Cloning an <code>Element</code> copies all attributes and their 
  -   * values, including those generated by the  XML processor to represent 
  -   * defaulted attributes, but this method does not copy any text it contains 
  -   * unless it is a deep clone, since the text is contained in a child 
  -   * <code>Text</code> node. Cloning any other type of node simply returns a 
  -   * copy of this node. 
  -   * @param deep If <code>true</code>, recursively clone the subtree under the 
  -   *   specified node; if <code>false</code>, clone only the node itself (and 
  -   *   its attributes, if it is an <code>Element</code>).  
  -   * @return The duplicate node.
  -   */
  -  public Node               cloneNode(boolean deep);
  +    /**
  +     * The name of this node, depending on its type; see the table above. 
  +     */
  +    public String       getNodeName();
  +    /**
  +     * The value of this node, depending on its type; see the table above. 
  +     * When it is defined to be <code>null</code>, setting it has no effect.
  +     * @exception DOMException
  +     *   NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
  +     * @exception DOMException
  +     *   DOMSTRING_SIZE_ERR: Raised when it would return more characters than 
  +     *   fit in a <code>DOMString</code> variable on the implementation 
  +     *   platform.
  +     */
  +    public String       getNodeValue()
  +                                       throws DOMException;
  +    public void         setNodeValue(String nodeValue)
  +                                       throws DOMException;
  +    /**
  +     * A code representing the type of the underlying object, as defined above.
  +     */
  +    public short        getNodeType();
  +    /**
  +     * The parent of this node. All nodes, except <code>Attr</code>, 
  +     * <code>Document</code>, <code>DocumentFragment</code>, 
  +     * <code>Entity</code>, and <code>Notation</code> may have a parent. 
  +     * However, if a	node has just been created and not yet added to the 
  +     * tree, or if it has been removed from the tree, this is 
  +     * <code>null</code>.
  +     */
  +    public Node         getParentNode();
  +    /**
  +     * A <code>NodeList</code> that contains all children of this node. If 
  +     * there are no children, this is a <code>NodeList</code> containing no 
  +     * nodes. The content of the returned <code>NodeList</code> is "live" in 
  +     * the sense that, for instance, changes to the children of the node 
  +     * object that it	was created from are immediately reflected in the nodes 
  +     * returned by the <code>NodeList</code> accessors; it is not a static 
  +     * snapshot of the content of the node. This is true for every 
  +     * <code>NodeList</code>, including the ones returned by the 
  +     * <code>getElementsByTagName</code> method.
  +     */
  +    public NodeList     getChildNodes();
  +    /**
  +     * The first child of this node. If there is no such node, this returns 
  +     * <code>null</code>.
  +     */
  +    public Node         getFirstChild();
  +    /**
  +     * The last child of this node. If there is no such node, this returns 
  +     * <code>null</code>.
  +     */
  +    public Node         getLastChild();
  +    /**
  +     * The node immediately preceding this node. If there is no such node, 
  +     * this returns <code>null</code>.
  +     */
  +    public Node         getPreviousSibling();
  +    /**
  +     * The node immediately following this node. If there is no such node, 
  +     * this returns <code>null</code>.
  +     */
  +    public Node         getNextSibling();
  +    /**
  +     * A <code>NamedNodeMap</code> containing the attributes of this node (if 
  +     * it is an <code>Element</code>) or <code>null</code> otherwise. 
  +     */
  +    public NamedNodeMap getAttributes();
  +    /**
  +     * The <code>Document</code> object associated with this node. This is 
  +     * also the <code>Document</code> object used to create new nodes. When 
  +     * this node is a <code>Document</code> or a <code>DocumentType</code> 
  +     * which is not used with any <code>Document</code> yet, this is 
  +     * <code>null</code>.
  +     * @version DOM Level 2
  +     */
  +    public Document     getOwnerDocument();
  +    /**
  +     * Inserts the node <code>newChild</code> before the existing child node 
  +     * <code>refChild</code>. If <code>refChild</code> is <code>null</code>, 
  +     * insert <code>newChild</code> at the end of the list of children.
  +     * <br>If <code>newChild</code> is a <code>DocumentFragment</code> object, 
  +     * all of its children are inserted, in the same order, before 
  +     * <code>refChild</code>. If the <code>newChild</code> is already in the 
  +     * tree, it is first removed.
  +     * @param newChild The node to insert.
  +     * @param refChild The reference node, i.e., the node before which the new 
  +     *   node must be inserted.
  +     * @return The node being inserted.
  +     * @exception DOMException
  +     *   HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does 
  +     *   not allow children of the type of the <code>newChild</code> node, or 
  +     *   if the node to insert is one of this node's ancestors.
  +     *   <br>WRONG_DOCUMENT_ERR: Raised if <code>newChild</code> was created 
  +     *   from a different document than the one that created this node.
  +     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node or the node 
  +     *   being inserted is readonly.
  +     *   <br>NOT_FOUND_ERR: Raised if <code>refChild</code> is not a child of 
  +     *   this node.
  +     */
  +    public Node         insertBefore(Node newChild, 
  +                                     Node refChild)
  +                                     throws DOMException;
  +    /**
  +     * Replaces the child node <code>oldChild</code> with <code>newChild</code>
  +     *  in the list of children, and returns the <code>oldChild</code> node.
  +     * <br>If <code>newChild</code> is a <code>DocumentFragment</code> object, 
  +     * <code>refChild</code> is replaced by all of the 
  +     * <code>DocumentFragment</code> children, which are inserted in the same 
  +     * order. If the <code>newChild</code> is already in the tree, it is 
  +     * first removed.
  +     * @param newChild The new node to put in the child list.
  +     * @param oldChild The node being replaced in the list.
  +     * @return The node replaced.
  +     * @exception DOMException
  +     *   HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does 
  +     *   not allow children of the type of the <code>newChild</code> node, or 
  +     *   it the node to put in is one of this node's ancestors.
  +     *   <br>WRONG_DOCUMENT_ERR: Raised if <code>newChild</code> was created 
  +     *   from a different document than the one that created this node.
  +     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node or the new node 
  +     *   is readonly.
  +     *   <br>NOT_FOUND_ERR: Raised if <code>oldChild</code> is not a child of 
  +     *   this node.
  +     */
  +    public Node         replaceChild(Node newChild, 
  +                                     Node oldChild)
  +                                     throws DOMException;
  +    /**
  +     * Removes the child node indicated by <code>oldChild</code> from the list 
  +     * of children, and returns it.
  +     * @param oldChild The node being removed.
  +     * @return The node removed.
  +     * @exception DOMException
  +     *   NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
  +     *   <br>NOT_FOUND_ERR: Raised if <code>oldChild</code> is not a child of 
  +     *   this node.
  +     */
  +    public Node         removeChild(Node oldChild)
  +                                    throws DOMException;
  +    /**
  +     * Adds the node <code>newChild</code> to the end of the list of children 
  +     * of this node. If the <code>newChild</code> is already in the tree, it 
  +     * is first removed.
  +     * @param newChild The node to add.If it is a  
  +     *   <code>DocumentFragment</code> object, the entire contents of the 
  +     *   document fragment are moved into the child list of this node
  +     * @return The node added.
  +     * @exception DOMException
  +     *   HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does 
  +     *   not allow children of the type of the <code>newChild</code> node, or 
  +     *   if the node to append is one of this node's ancestors.
  +     *   <br>WRONG_DOCUMENT_ERR: Raised if <code>newChild</code> was created 
  +     *   from a different document than the one that created this node.
  +     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node or the node 
  +     *   being appended is readonly.
  +     */
  +    public Node         appendChild(Node newChild)
  +                                    throws DOMException;
  +    /**
  +     *  This is a convenience method to allow easy determination of whether a 
  +     * node has any children.
  +     * @return  <code>true</code> if the node has any children, 
  +     *   <code>false</code> if the node has no children.
  +     */
  +    public boolean      hasChildNodes();
  +    /**
  +     * Returns a duplicate of this node, i.e., serves as a generic copy 
  +     * constructor for nodes. The duplicate node has no parent (
  +     * <code>parentNode</code> returns <code>null</code>.).
  +     * <br>Cloning an <code>Element</code> copies all attributes and their 
  +     * values, including those generated by the XML processor to represent 
  +     * defaulted attributes, but this method does not copy any text it 
  +     * contains unless it is a deep clone, since the text is contained in a 
  +     * child <code>Text</code> node. Cloning any other type of node simply 
  +     * returns a copy of this node.
  +     * <br>Note that cloning an immutable subtree results in a mutable copy, 
  +     * but the children of an <code>EntityReference</code> clone are readonly.
  +     * @param deep If <code>true</code>, recursively clone the subtree under 
  +     *   the specified node; if <code>false</code>, clone only the node 
  +     *   itself (and its attributes, if it is an <code>Element</code>).  
  +     * @return The duplicate node.
  +     */
  +    public Node         cloneNode(boolean deep);
  +    /**
  +     * Puts all <code>Text</code> nodes in the full depth of the sub-tree 
  +     * underneath this <code>Node</code>, including attribute nodes, into a 
  +     * "normal" form where only markup (e.g., tags, comments, processing 
  +     * instructions, CDATA sections, and entity references) separates 
  +     * <code>Text</code> nodes, i.e., there are no adjacent <code>Text</code> 
  +     * nodes.  This can be used to ensure that the DOM view of a document is 
  +     * the same as if it were saved and re-loaded, and is useful when 
  +     * operations (such as XPointer lookups) that depend on a particular 
  +     * document tree structure are to be used.In cases where the document 
  +     * contains <code>CDATASections</code>, the normalize operation alone may 
  +     * not be sufficient, since XPointers do not differentiate between 
  +     * <code>Text</code> nodes and <code>CDATASection</code> nodes.
  +     */
  +    public void         normalize();
  +    /**
  +     * Tests whether the DOM implementation implements a specific feature and 
  +     * that feature is supported by this node.
  +     * @since DOM Level 2
  +     * @param feature The string of the feature to test. This is the same name 
  +     *   that which can be passed to the method <code>hasFeature</code> on 
  +     *   <code>DOMImplementation</code>.
  +     * @param version This is the version number of the feature to test. In 
  +     *   Level 2, version 1, this is the string "2.0". If the version is not 
  +     *   specified, supporting any version of the feature will cause the 
  +     *   method to return <code>true</code>.
  +     * @return Returns <code>true</code> if the specified feature is supported 
  +     *   on this node, <code>false</code> otherwise.
  +     */
  +    public boolean      supports(String feature, 
  +                                 String version);
  +    /**
  +     * The namespace URI of this node, or <code>null</code> if it is 
  +     * unspecified.
  +     * <br>This is not a computed value that is the result of a namespace 
  +     * lookup based on an examination of the namespace declarations in scope. 
  +     * It is merely the namespace URI given at creation time.
  +     * <br>For nodes of any type other than <code>ELEMENT_NODE</code> and 
  +     * <code>ATTRIBUTE_NODE</code> and nodes created with a DOM Level 1 
  +     * method, such as <code>createElement</code> from the 
  +     * <code>Document</code> interface, this is always <code>null</code>.Per 
  +     * the Namespaces in XML Specification  an attribute does not inherit its 
  +     * namespace from the element it is attached to. If an attribute is not 
  +     * explicitly given a namespace, it simply has no namespace.
  +     */
  +    public String       getNamespaceURI();
  +    /**
  +     * The namespace prefix of this node, or <code>null</code> if it is 
  +     * unspecified.
  +     * <br>Note that setting this attribute, when permitted, changes the 
  +     * <code>nodeName</code> attribute, which holds the qualified name, as 
  +     * well as the <code>tagName</code> and <code>name</code> attributes of 
  +     * the <code>Element</code> and <code>Attr</code> interfaces, when 
  +     * applicable.
  +     * <br>Note also that changing the prefix of an attribute, that is known to
  +     *  have a default value, does not make a new attribute with the default 
  +     * value and the original prefix appear, since the 
  +     * <code>namespaceURI</code> and <code>localName</code> do not change.
  +     * @since DOM Level 2
  +     * @exception DOMException
  +     *   INVALID_CHARACTER_ERR: Raised if the specified prefix contains an 
  +     *   illegal character.
  +     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
  +     *   <br>NAMESPACE_ERR: Raised if the specified <code>prefix</code> is 
  +     *   malformed, if the specified prefix is "xml" and the 
  +     *   <code>namespaceURI</code> of this node is different from 
  +     *   "http://www.w3.org/XML/1998/namespace", if specified prefix is 
  +     *   "xmlns" and the <code>namespaceURI</code> is neither 
  +     *   <code>null</code> nor an empty string, or if the 
  +     *   <code>localName</code> is <code>null</code> .
  +     */
  +    public String       getPrefix();
  +    public void         setPrefix(String prefix)
  +                                 throws DOMException;
  +    /**
  +     * Returns the local part of the qualified name of this node.
  +     * <br>For nodes created with a DOM Level 1 method, such as 
  +     * <code>createElement</code> from the <code>Document</code> interface, 
  +     * it is <code>null</code>.
  +     * @since DOM Level 2
  +     */
  +    public String       getLocalName();
   }
   
  
  
  
  1.2       +26 -25    xml-xerces/java/src/org/w3c/dom/NodeList.java
  
  Index: NodeList.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/NodeList.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- NodeList.java	1999/11/09 01:11:27	1.1
  +++ NodeList.java	2000/01/06 22:00:09	1.2
  @@ -1,11 +1,14 @@
  -/** 
  - * ----- 
  - * Copyright (c) World Wide Web Consortium, (Massachusetts Institute of 
  - * Technology, Institut National de Recherche en Informatique et en 
  - * Automatique, Keio University). All Rights Reserved. 
  - * http://www.w3.org/Consortium/Legal/ 
  - * ----- 
  - */ 
  +/*
  + * Copyright (c) 1999 World Wide Web Consortium,
  + * (Massachusetts Institute of Technology, Institut National de
  + * Recherche en Informatique et en Automatique, Keio University). All
  + * Rights Reserved. This program is distributed under the W3C's Software
  + * Intellectual Property License. This program is distributed in the
  + * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
  + * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  + * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
  + * details.
  + */
   
   package org.w3c.dom;
   
  @@ -15,24 +18,22 @@
    * is implemented.
    * <p>The items in the <code>NodeList</code> are accessible via an integral 
    * index, starting from 0. 
  - *
  - * @version
    */
   public interface NodeList {
  -  /**
  -   * Returns the <code>index</code>th item in the collection. If 
  -   * <code>index</code> is greater than or equal to the number of nodes in 
  -   * the list, this returns <code>null</code>.
  -   * @param index Index into the collection.
  -   * @return The node at the <code>index</code>th position in the 
  -   *   <code>NodeList</code>, or <code>null</code> if that is not a valid 
  -   *   index.
  -   */
  -  public Node               item(int index);
  -  /**
  -   * The number of nodes in the list. The range of valid child node indices is 
  -   * 0 to <code>length-1</code> inclusive. 
  -   */
  -  public int                getLength();
  +    /**
  +     * Returns the <code>index</code>th item in the collection. If 
  +     * <code>index</code> is greater than or equal to the number of nodes in 
  +     * the list, this returns <code>null</code>.
  +     * @param index Index into the collection.
  +     * @return The node at the <code>index</code>th position in the 
  +     *   <code>NodeList</code>, or <code>null</code> if that is not a valid 
  +     *   index.
  +     */
  +    public Node         item(int index);
  +    /**
  +     * The number of nodes in the list. The range of valid child node indices 
  +     * is 0 to <code>length-1</code> inclusive. 
  +     */
  +    public int          getLength();
   }
   
  
  
  
  1.2       +21 -20    xml-xerces/java/src/org/w3c/dom/Notation.java
  
  Index: Notation.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/Notation.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Notation.java	1999/11/09 01:11:27	1.1
  +++ Notation.java	2000/01/06 22:00:09	1.2
  @@ -1,11 +1,14 @@
  -/** 
  - * ----- 
  - * Copyright (c) World Wide Web Consortium, (Massachusetts Institute of 
  - * Technology, Institut National de Recherche en Informatique et en 
  - * Automatique, Keio University). All Rights Reserved. 
  - * http://www.w3.org/Consortium/Legal/ 
  - * ----- 
  - */ 
  +/*
  + * Copyright (c) 1999 World Wide Web Consortium,
  + * (Massachusetts Institute of Technology, Institut National de
  + * Recherche en Informatique et en Automatique, Keio University). All
  + * Rights Reserved. This program is distributed under the W3C's Software
  + * Intellectual Property License. This program is distributed in the
  + * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
  + * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  + * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
  + * details.
  + */
   
   package org.w3c.dom;
   
  @@ -19,19 +22,17 @@
    * <p>The DOM Level 1 does not support editing <code>Notation</code> nodes; 
    * they are therefore readonly.
    * <p>A <code>Notation</code> node does not have any parent.
  - *
  - * @version
    */
   public interface Notation extends Node {
  -  /**
  -   * The public identifier of this notation. If the  public identifier was not 
  -   * specified, this is <code>null</code>.
  -   */
  -  public String             getPublicId();
  -  /**
  -   * The system identifier of this notation. If the  system identifier was not 
  -   * specified, this is <code>null</code>.
  -   */
  -  public String             getSystemId();
  +    /**
  +     * The public identifier of this notation. If the  public identifier was 
  +     * not specified, this is <code>null</code>.
  +     */
  +    public String       getPublicId();
  +    /**
  +     * The system identifier of this notation. If the  system identifier was 
  +     * not specified, this is <code>null</code>.
  +     */
  +    public String       getSystemId();
   }
   
  
  
  
  1.2       +27 -25    xml-xerces/java/src/org/w3c/dom/ProcessingInstruction.java
  
  Index: ProcessingInstruction.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/ProcessingInstruction.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ProcessingInstruction.java	1999/11/09 01:11:28	1.1
  +++ ProcessingInstruction.java	2000/01/06 22:00:09	1.2
  @@ -1,11 +1,14 @@
  -/** 
  - * ----- 
  - * Copyright (c) World Wide Web Consortium, (Massachusetts Institute of 
  - * Technology, Institut National de Recherche en Informatique et en 
  - * Automatique, Keio University). All Rights Reserved. 
  - * http://www.w3.org/Consortium/Legal/ 
  - * ----- 
  - */ 
  +/*
  + * Copyright (c) 1999 World Wide Web Consortium,
  + * (Massachusetts Institute of Technology, Institut National de
  + * Recherche en Informatique et en Automatique, Keio University). All
  + * Rights Reserved. This program is distributed under the W3C's Software
  + * Intellectual Property License. This program is distributed in the
  + * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
  + * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  + * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
  + * details.
  + */
   
   package org.w3c.dom;
   
  @@ -13,24 +16,23 @@
    * The <code>ProcessingInstruction</code> interface represents a  "processing 
    * instruction", used in XML as a way to keep processor-specific information 
    * in the text of the document.
  - *
  - * @version
    */
   public interface ProcessingInstruction extends Node {
  -  /**
  -   * The target of this processing instruction. XML defines this as being the 
  -   * first token following the markup that begins the processing instruction.
  -   */
  -  public String             getTarget();
  -  /**
  -   * The content of this processing instruction. This is from the first non 
  -   * white space character after the target to the character immediately 
  -   * preceding the <code>?&gt;</code>.
  -   * @exception DOMException
  -   *   NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
  -   */
  -  public String             getData();
  -  public void               setData(String data)
  -                                      throws DOMException;
  +    /**
  +     * The target of this processing instruction. XML defines this as being 
  +     * the first token following the markup that begins the processing 
  +     * instruction.
  +     */
  +    public String       getTarget();
  +    /**
  +     * The content of this processing instruction. This is from the first non 
  +     * white space character after the target to the character immediately 
  +     * preceding the <code>?&gt;</code>.
  +     * @exception DOMException
  +     *   NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
  +     */
  +    public String       getData();
  +    public void         setData(String data)
  +                                  throws DOMException;
   }
   
  
  
  
  1.2       +38 -36    xml-xerces/java/src/org/w3c/dom/Text.java
  
  Index: Text.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/Text.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Text.java	1999/11/09 01:11:28	1.1
  +++ Text.java	2000/01/06 22:00:09	1.2
  @@ -1,22 +1,26 @@
  -/** 
  - * ----- 
  - * Copyright (c) World Wide Web Consortium, (Massachusetts Institute of 
  - * Technology, Institut National de Recherche en Informatique et en 
  - * Automatique, Keio University). All Rights Reserved. 
  - * http://www.w3.org/Consortium/Legal/ 
  - * ----- 
  - */ 
  +/*
  + * Copyright (c) 1999 World Wide Web Consortium,
  + * (Massachusetts Institute of Technology, Institut National de
  + * Recherche en Informatique et en Automatique, Keio University). All
  + * Rights Reserved. This program is distributed under the W3C's Software
  + * Intellectual Property License. This program is distributed in the
  + * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
  + * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  + * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
  + * details.
  + */
   
   package org.w3c.dom;
   
   /**
  - * The <code>Text</code> interface represents the textual content (termed 
  - * character  data in XML) of an <code>Element</code> or <code>Attr</code>.  
  - * If there is no markup inside an element's content, the text is contained 
  - * in a single object implementing the <code>Text</code> interface that is 
  - * the only child of the element. If there is markup, it is parsed into a 
  - * list of elements and <code>Text</code> nodes that form the list of 
  - * children of the element.
  + * The <code>Text</code> interface inherits from <code>CharacterData</code> 
  + * and represents the textual content (termed character  data in XML) of an 
  + * <code>Element</code> or <code>Attr</code>.  If there is no markup inside 
  + * an element's content, the text is contained in a single object 
  + * implementing the <code>Text</code> interface that is the only child of the 
  + * element. If there is markup, it is parsed into the information items 
  + * (elements,  comments, etc.) and <code>Text</code>  nodes that form the 
  + * list of children of the element.
    * <p>When a document is first made available via the DOM, there is  only one 
    * <code>Text</code> node for each block of text. Users may create  adjacent 
    * <code>Text</code> nodes that represent the  contents of a given element 
  @@ -25,28 +29,26 @@
    * will not (in general) persist between DOM editing sessions. The 
    * <code>normalize()</code> method on <code>Element</code> merges any such 
    * adjacent <code>Text</code> objects into a single node for each block of 
  - * text; this is  recommended before employing operations that depend on a 
  - * particular document structure, such as navigation with 
  - * <code>XPointers.</code> 
  - *
  - * @version
  + * text.
    */
   public interface Text extends CharacterData {
  -  /**
  -   * Breaks this <code>Text</code> node into two Text nodes at the specified 
  -   * offset, keeping both in the tree as siblings. This node then only 
  -   * contains all the content up to the <code>offset</code> point. And a new 
  -   * <code>Text</code> node, which is inserted as the next sibling of  this 
  -   * node, contains all the content at and after the <code>offset</code> 
  -   * point.
  -   * @param offset The offset at which to split, starting from 0.
  -   * @return The new <code>Text</code> node.
  -   * @exception DOMException
  -   *   INDEX_SIZE_ERR: Raised if the specified offset is negative or greater 
  -   *   than the number of characters in <code>data</code>.
  -   *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
  -   */
  -  public Text               splitText(int offset)
  -                                      throws DOMException;
  +    /**
  +     * Breaks this node into two  nodes at the specified <code>offset</code>, 
  +     * keeping both in the tree as siblings. This node then only contains all 
  +     * the content up to the <code>offset</code> point. And a new node of the 
  +     * same nodeType, which is inserted as the next sibling of this node, 
  +     * contains all the content at and after the <code>offset</code> point. 
  +     * When the <code>offset</code> is equal to the length of this node, the 
  +     * new node has no data.
  +     * @param offset The 16-bit unit offset at which to split, starting from 
  +     *   p0.
  +     * @return The new <code>Text</code> node.
  +     * @exception DOMException
  +     *   INDEX_SIZE_ERR: Raised if the specified offset is negative or 
  +     *   greater than the number of 16-bit units in <code>data</code>.
  +     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
  +     */
  +    public Text         splitText(int offset)
  +                                  throws DOMException;
   }