You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by le...@locus.apache.org on 2000/01/29 02:34:56 UTC

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

lehors      00/01/28 17:34:56

  Modified:    java/src/org/apache/xerces/dom DeferredAttrNSImpl.java
  Log:
  all namespace declaration attributes are now bound to the predefined
  namespaceURI http://www.w3.org/2000/xmlns/
  
  Revision  Changes    Path
  1.2       +10 -1     xml-xerces/java/src/org/apache/xerces/dom/DeferredAttrNSImpl.java
  
  Index: DeferredAttrNSImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/dom/DeferredAttrNSImpl.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DeferredAttrNSImpl.java	2000/01/14 02:47:04	1.1
  +++ DeferredAttrNSImpl.java	2000/01/29 01:34:56	1.2
  @@ -1,4 +1,4 @@
  -/* $Id: DeferredAttrNSImpl.java,v 1.1 2000/01/14 02:47:04 lehors Exp $ */
  +/* $Id: DeferredAttrNSImpl.java,v 1.2 2000/01/29 01:34:56 lehors Exp $ */
   /*
    * The Apache Software License, Version 1.1
    *
  @@ -137,6 +137,15 @@
   	prefix = pool.toString(pool.getPrefixForQName(elementTypeName));
   	if (prefix != null)  { // REVIST: Unqualified attributes do not inherit default namespaces.
   	    namespaceURI = pool.toString(pool.getURIForQName(elementTypeName));
  +	    if (namespaceURI == null) {
  +		if (prefix.equals("xml")) {
  +		    namespaceURI = "http://www.w3.org/XML/1998/namespace";
  +		} else if (prefix.equals("xmlns")) {
  +		    namespaceURI = "http://www.w3.org/2000/xmlns/";
  +		}
  +	    }
  +	} else if (name.equals("xmlns")) {
  +	    namespaceURI = "http://www.w3.org/2000/xmlns/";
   	}
   	localName = pool.toString(pool.getLocalPartForQName(elementTypeName));