[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Classpathx-xml] Proposal for the ISO character entity bug in gnujaxp
From: |
Arnaud Vandyck |
Subject: |
[Classpathx-xml] Proposal for the ISO character entity bug in gnujaxp |
Date: |
Sun, 13 Oct 2002 11:09:22 +0200 (CEST) |
Hi everybody, hi Nic,
Looking at you problem with your xml fragment
<http://mail.gnu.org/pipermail/classpathx-xml/2002-May/000125.html>, I
did some tests to find where is the bug.
First, I created a test class to show the nodes of a document with
DOM. I also did an xml file near yours and I saw you were working with
DocBook for xml (SimpleDocbook if I recall). I did some tests and
found that the problem was when parsing the ISO character entity of
Docbook (for example: <!ENTITY euro "€">).
I did change the call of the readLiteral(int) method in the
parseEntityDecl() method in the gnu.xml.aelfred2.XmlParser class.
This call is to get the value of an entity if I did understant the
code correctly. But it passes the value '0'. I did change it to value
LIT_DISABLE_CREF (this is an integer, the value is 16). Looking in
other methods, I saw the developers use an 'int flags=LIT_DISABLE_...'
line. I did the same in the parseEntityDecl() method.
I do not know if this will not cause any other problems and I suggest
everyone who can to look at the patch before committing the
changes... maybe someone can forward this mail to one of the author or
both (David Megginson <address@hidden>, David Brownell
<address@hidden>) to be sure the patch is correct.
Please boys, be indulgent for my first patch ever! :-) If I gave to
many descriptions (too verboze?), if the patch format is not good, if
there is a problem, let me know. If my english is not very good, well,
don't let me know, I already do :-)
These commands patch the good file:
# cd jaxp_root
# patch -p1 < ../jaxp-char-entities-patch-20021012.diff
This is also the first time I use the diff and patch commands!
I hope this helps, have a nice day/night :-)
PS: I also attached a Test.java and a test.xml files.
You'll have to change the dtd location, I used the docbook xml
v4.2 for the test.
-- arnaud :: http://vbstefi60.fapse.ulg.ac.be/~arnaud/
- [Classpathx-xml] Proposal for the ISO character entity bug in gnujaxp,
Arnaud Vandyck <=
- Re: [Classpathx-xml] Proposal for the ISO character entity bug in gnujaxp, Nic Ferrier, 2002/10/13
- Re: [Classpathx-xml] Proposal for the ISO character entity bug in gnujaxp, nferrier, 2002/10/15
- Re: [Classpathx-xml] Proposal for the ISO character entity bug in gnujaxp, Arnaud Vandyck, 2002/10/15
- Re: [Classpathx-xml] Proposal for the ISO character entity bug in gnujaxp, Nic Ferrier, 2002/10/15
- Testing [was: Re: [Classpathx-xml] Proposal for the ISO character entity bug in gnujaxp], Arnaud Vandyck, 2002/10/19
- Re: Testing [was: Re: [Classpathx-xml] Proposal for the ISO character entity bug in gnujaxp], nferrier, 2002/10/18
- Re: Testing [was: Re: [Classpathx-xml] Proposal for the ISO character entity bug in gnujaxp], Jeff Rafter, 2002/10/18
- Re: Testing [was: Re: [Classpathx-xml] Proposal for the ISO character entity bug in gnujaxp], Nic Ferrier, 2002/10/19
- [Classpathx-xml] Re: Testing, Arnaud Vandyck, 2002/10/19