You are viewing a plain text version of this content. The canonical link for it is here.
Posted to crimson-cvs@xml.apache.org by ed...@apache.org on 2001/03/06 21:46:28 UTC

cvs commit: xml-crimson/src/org/apache/crimson/tree XmlDocument.java ElementNode2.java

edwingo     01/03/06 12:46:28

  Modified:    src/org/apache/crimson/tree XmlDocument.java
                        ElementNode2.java
  Log:
  Fix Document.createElement() doesn't accept ":",":xxx" and "xxx:" as
  element names
  
  Revision  Changes    Path
  1.4       +4 -2      xml-crimson/src/org/apache/crimson/tree/XmlDocument.java
  
  Index: XmlDocument.java
  ===================================================================
  RCS file: /home/cvs/xml-crimson/src/org/apache/crimson/tree/XmlDocument.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- XmlDocument.java	2001/02/24 03:23:45	1.3
  +++ XmlDocument.java	2001/03/06 20:46:27	1.4
  @@ -1,5 +1,5 @@
   /*
  - * $Id: XmlDocument.java,v 1.3 2001/02/24 03:23:45 edwingo Exp $
  + * $Id: XmlDocument.java,v 1.4 2001/03/06 20:46:27 edwingo Exp $
    *
    * The Apache Software License, Version 1.1
    *
  @@ -129,7 +129,7 @@
    *
    * @author David Brownell
    * @author Rajiv Mordani
  - * @version $Revision: 1.3 $
  + * @version $Revision: 1.4 $
    */
   public class XmlDocument extends ParentNode implements DocumentEx
   {
  @@ -840,6 +840,8 @@
       public Element createElementNS(String namespaceURI, String qualifiedName)
           throws DOMException
       {
  +        // Check arguments and throw appropriate exceptions
  +        ElementNode2.checkArguments(namespaceURI, qualifiedName);
           ElementNode2 retval = new ElementNode2(namespaceURI, qualifiedName);
           retval.setOwnerDocument(this);
           return retval;
  
  
  
  1.3       +2 -4      xml-crimson/src/org/apache/crimson/tree/ElementNode2.java
  
  Index: ElementNode2.java
  ===================================================================
  RCS file: /home/cvs/xml-crimson/src/org/apache/crimson/tree/ElementNode2.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ElementNode2.java	2001/02/28 00:19:50	1.2
  +++ ElementNode2.java	2001/03/06 20:46:28	1.3
  @@ -1,5 +1,5 @@
   /*
  - * $Id: ElementNode2.java,v 1.2 2001/02/28 00:19:50 edwingo Exp $
  + * $Id: ElementNode2.java,v 1.3 2001/03/06 20:46:28 edwingo Exp $
    *
    * The Apache Software License, Version 1.1
    *
  @@ -115,8 +115,6 @@
           throws DomEx
       {
           super(namespaceURI, qName);
  -        // Check arguments and throw appropriate exceptions
  -        checkArguments(namespaceURI, qName);
       }
   
       // Used for cloneNode()
  @@ -131,7 +129,7 @@
           ownerDocument = original.ownerDocument;
       }
   
  -    private void checkArguments(String namespaceURI, String qualifiedName)
  +    static void checkArguments(String namespaceURI, String qualifiedName)
           throws DomEx
       {
           // [6] QName ::= (Prefix ':')? LocalPart