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 bu...@apache.org on 2002/01/08 19:29:16 UTC

DO NOT REPLY [Bug 5745] New: - XMLAttributes API

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5745>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5745

XMLAttributes API

           Summary: XMLAttributes API
           Product: Xerces2-J
           Version: 2.0.0 [beta 4]
          Platform: PC
               URL: http://http://
        OS/Version: Linux
            Status: NEW
          Severity: Major
          Priority: Other
         Component: XNI
        AssignedTo: xerces-j-dev@xml.apache.org
        ReportedBy: petr.kuzel@sun.com


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.

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