[jdom-interest] Bugs in SAXOutputter
Laurent Bihanic
laurent.bihanic at atosorigin.com
Thu Sep 12 08:35:29 PDT 2002
Hi,
While reading the SAXOutputter code (latest from CVS), I found 2 apparent bugs:
1. No support for Comments as Element children
SAXOutputter fires SAX events for Comment nodes in method output(Document) but
not in method elementContent(Element, NamespaceStack). Hence only top level
comments are outputted.
2. No support for CDATA
The method characters(String) should be changed (adding an argument or a new
method) to support reporting whether the outputted text is regular or CDATA
using LexicalHandler's start/endCDATA methods.
Finally, SAXOutputter's code never checks for EntityRef nodes. Thus these
simply disappear from the outputted document. Is this on purpose? Shouldn't
JDOM at least use ContentHandler's skippedEntity?
Laurent
--
wWw Zzzzz
(- -)
-------------ooO-(_)-Ooo-----------------------------------------------
Laurent Bihanic | Tel: +33 (0)1 55.91.21.93 (Direct line)
Atos Origin | +33 (0)1 55.91.20.00
Intégration - e-Business | Fax: +33 (0)1 55.91.22.31
Les Miroirs - Bat. C |
18, avenue d'Alsace |
F-92926 La Defense Cedex | e-Mail: laurent.bihanic at atosorigin.com
-----------------------------------------------------------------------
"Microsoft isn't the answer. Microsoft is the question and the answer
is no."
DISCLAIMER:
The opinions expressed are entirely my own and may not necessarily be
those of my employer. Also, I am not now nor have I ever been a
lawyer. My opinions are provided as-is with absolutely no warrantee of
merchantability or fitness for any particular use. Besides, you can't
prove I typed this. No body saw me type this. Who says I typed this?
More information about the jdom-interest
mailing list