You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by ve...@apache.org on 2003/09/09 11:16:48 UTC

cvs commit: xml-xerces/java/src/org/apache/xerces/dom CoreDocumentImpl.java

venu        2003/09/09 02:16:48

  Modified:    java/src/org/apache/xerces/dom Tag: jaxp-1_3_0-branch
                        CoreDocumentImpl.java
  Log:
  Description : Throw NAMESPACE_ERR: when namespace uri is null and qname has a prefix.
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.43.2.1  +11 -2     xml-xerces/java/src/org/apache/xerces/dom/CoreDocumentImpl.java
  
  Index: CoreDocumentImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/dom/CoreDocumentImpl.java,v
  retrieving revision 1.43
  retrieving revision 1.43.2.1
  diff -u -r1.43 -r1.43.2.1
  --- CoreDocumentImpl.java	30 Jul 2003 19:39:22 -0000	1.43
  +++ CoreDocumentImpl.java	9 Sep 2003 09:16:48 -0000	1.43.2.1
  @@ -872,7 +872,16 @@
   		}
   		else {
   		    if (namespaceURI == null) {
  -                        el.rename(name);
  +				int colon1 = name.indexOf(':');
  +				if(colon1 != -1){
  +					String msg =
  +						DOMMessageFormatter.formatMessage(
  +						DOMMessageFormatter.DOM_DOMAIN,
  +						"NAMESPACE_ERR",
  +						null);
  +					throw new DOMException(DOMException.NAMESPACE_ERR, msg);
  +				}
  +                el.rename(name);
   		    }
   		    else {
   			// we need to create a new object
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org