ilene       2002/11/04 11:14:02

  Modified:    java/src/org/apache/xpath/domapi XPathNamespaceImpl.java
  Log:
  Update XPathNamespaceImpl to be consistent with spec for
  getLocalName, getPrefix, getNamespaceURI, getNodeName, getNodeValue
  
  Revision  Changes    Path
  1.2       +8 -3      
xml-xalan/java/src/org/apache/xpath/domapi/XPathNamespaceImpl.java
  
  Index: XPathNamespaceImpl.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xpath/domapi/XPathNamespaceImpl.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XPathNamespaceImpl.java   29 Oct 2002 02:42:26 -0000      1.1
  +++ XPathNamespaceImpl.java   4 Nov 2002 19:14:02 -0000       1.2
  @@ -128,7 +128,7 @@
        * @see org.w3c.dom.Node#getNodeName()
        */
       public String getNodeName() {
  -        return m_attributeNode.getNodeName();
  +        return "#namespace";
       }
   
       /**
  @@ -267,7 +267,10 @@
        * @see org.w3c.dom.Node#getNamespaceURI()
        */
       public String getNamespaceURI() {
  -        return m_attributeNode.getNamespaceURI();
  +        
  +        // For namespace node, the namespaceURI is the namespace URI
  +        // of the namespace represented by the node.
  +        return m_attributeNode.getNodeValue();
       }
   
       /**
  @@ -287,7 +290,9 @@
        * @see org.w3c.dom.Node#getLocalName()
        */
       public String getLocalName() {
  -        return m_attributeNode.getLocalName();
  +        
  +        // For namespace node, the local name is the same as the prefix
  +        return m_attributeNode.getPrefix();
       }
   
       /**
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to