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 Jörg Kiegeland <pa...@web.de> on 2005/04/18 00:53:38 UTC
bug report
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: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org
Re: bug report
Posted by Michael Glavassevich <mr...@ca.ibm.com>.
Hello Jörg,
The best place for reporting bugs against Xerces is JIRA [1]. Please open
your bug reports there so that they can be tracked better. You'll need to
create [2] an account if you don't already have one. When submitting
fixes, it will make it easier to assess and apply them if you provide a
patches (in the form of context diffs) using the latest CVS source.
Thanks.
[1] http://issues.apache.org/jira/browse/XERCESJ
[2] http://issues.apache.org/jira/secure/Signup!default.jspa
"Jörg Kiegeland" <pa...@web.de> wrote on 04/17/2005 06:53:38 PM:
> 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).
Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org