Hello,

while using Xerces-J_2_0_0_beta3 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:[EMAIL PROTECTED]";>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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to