Hello,

I had written a freeware XML editor
(http://xdoc.sourceforge.net/)  under GNU license supporting 
many XML schemes, using Xerces, and found some errors and corrected them
within my copy of the source code of Xerces. I hope this is the right place
to report bugs (and i have fixes them already here, some bugs costing me
hours of debugging).

*************Bug1:

in DOMNormalizer.java:

I changed

AttributeMap attributes = (elem.hasAttributes()) ? (AttributeMap) 
elem.getAttributes() : null;

                 // fix namespaces and remove default attributes
                 if ((fConfiguration.features & 
DOMConfigurationImpl.NAMESPACES) !=0) {
                     // fix namespaces
                     // normalize attribute values
                     // remove default attributes
                     namespaceFixUp(elem, attributes);
                 } else {
 ..

 to



 ..

                 AttributeMap attributes = (elem.hasAttributes()) ? 
(AttributeMap) elem.getAttributes() : null;

                 // fix namespaces and remove default attributes
                 if ((fConfiguration.features & 
DOMConfigurationImpl.NAMESPACES) !=0) {
                     // fix namespaces
                     // normalize attribute values
                     // remove default attributes
                     namespaceFixUp(elem, attributes);
                     attributes = (elem.hasAttributes()) ? (AttributeMap) 
elem.getAttributes() : null; //new line
                 } else {


.. so added the line
 attributes = (elem.hasAttributes()) ? (AttributeMap) elem.getAttributes() : 
null;
because while executing namespaceFixUp some attributes can be added
but the variable "attributes" still holds NULL if it was NULL before executing 
namespaceFixUp.
This was very hard to debug and the bug
came active as i read in the complete XHTML Modularization schema files.



***************Bug2:
in EncodingMap.java:
Replace 

         fIANA2JavaMap.put("UTF-16",           "UTF-16");

with

         fIANA2JavaMap.put("UTF-16",           "Unicode");

This is correct regarding the inverse direction, 
 fJava2IANAMap.put("Unicode",   "UTF-16");
which is listed in this file, too. The detailed effect the bug has:
The encoding will not be recognized as Unicode in Encodings.java and the last
 printable character will be DEFAULT_LAST_PRINTABLE instead of 
LAST_PRINTABLE_UNICODE. This results in that every character greater than 0x7F 
will be escaped by a character reference.


I have still 3 more errors, but plz message me if these bugs are at the right 
adress.
THANKS

Greetings
J�rg Kiegeland



______________________________________________________________
Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193


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

Reply via email to