You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by ji...@apache.org on 2004/04/23 23:47:53 UTC

[jira] Closed: (XERCESJ-111) XMLAttributes API

Message:

   The following issue has been closed.

   Resolver: Andy Clark
       Date: Fri, 23 Apr 2004 2:46 PM

This is an extremely old issue and is no longer relevent for the current implementation.
---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/XERCESJ-111

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XERCESJ-111
    Summary: XMLAttributes API
       Type: Bug

     Status: Closed
 Resolution: FIXED

    Project: Xerces2-J
 Components: 
             XNI
   Versions:
             2.0.0 [beta 4]

   Assignee: 
   Reporter: Petr Kuzel

    Created: Tue, 8 Jan 2002 10:29 AM
    Updated: Fri, 23 Apr 2004 2:46 PM
Environment: Operating System: Linux
Platform: PC

Description:
plain mail copy:

Hello,

while using Xerces-J_2_0_0_beta3/4 I have problems with 
XMLAttributes.getNonNormalizedValue(int). It almost always
returns the normalized value. I think the problem lies in
setValue(int, String) method. It should not set non-normalized
value as a side effect. 

I think that it is cleaner to let non normalized value unaffected
as it stays same. If some code want to eliminate it let it invoke
setNonNormalizedValue() method. I think that specs of XMLAttributes
should be updated accordingly.

I have attached proposed patch. Does it make sense?

  Cc.

-- 
<address>
<a href="mailto:pkuzel@sun.com">Petr Kuzel</a> at Sun Microsystems
: <a href="http://xml.netbeans.org/">XML module</a> and
: <a href="http://jini.netbeans.org/">Jini</a> developer.</address>




Index: org/apache/xerces/util/XMLAttributesImpl.java
===================================================================
RCS file:
/home/cvspublic/xml-xerces/java/src/org/apache/xerces/util/XMLAttributesImpl.java,v
retrieving revision 1.7
diff -u -b -r1.7 XMLAttributesImpl.java
--- org/apache/xerces/util/XMLAttributesImpl.java       2001/10/03 18:31:18    
1.7
+++ org/apache/xerces/util/XMLAttributesImpl.java       2001/11/22 13:28:31
@@ -260,7 +260,7 @@
 
     /**
      * Sets the value of the attribute at the specified index. This
-     * method will overwrite the non-normalized value of the attribute.
+     * method dos not overwrite the non-normalized value of the attribute.
      * 
      * @param attrIndex The attribute index.
      * @param attrValue The new attribute value.
@@ -270,7 +270,6 @@
     public void setValue(int attrIndex, String attrValue) {
         Attribute attribute = fAttributes[attrIndex];
         attribute.value = attrValue;
-        attribute.nonNormalizedValue = attrValue;
     } // setValue(int,String)
 
     /**
Index: org/apache/xerces/xni/XMLAttributes.java
===================================================================
RCS file:
/home/cvspublic/xml-xerces/java/src/org/apache/xerces/xni/XMLAttributes.java,v
retrieving revision 1.5
diff -u -b -r1.5 XMLAttributes.java
--- org/apache/xerces/xni/XMLAttributes.java    2001/09/25 06:25:58     1.5
+++ org/apache/xerces/xni/XMLAttributes.java    2001/11/22 13:28:31
@@ -295,7 +295,7 @@
 
     /**
      * Sets the value of the attribute at the specified index. This
-     * method will overwrite the non-normalized value of the attribute.
+     * method does not overwrite the non-normalized value of the attribute.
      * 
      * @param attrIndex The attribute index.
      * @param attrValue The new attribute value.


---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


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