[jdom-interest] XMLOutputter PI and formatting problem...
Jason Hunter
jhunter at collab.net
Fri Aug 10 14:32:10 PDT 2001
> I'm having some trouble with unexpanded entities. Basically, in the output,
> each unexpanded entity starts on a new line. This is ok, but when I call the
> updateFile() method on that file again, I get another line break added
> before and after the unexpanded entity. So the more times I call the method,
> the more line breaks I get between my entities!
Sounds like a problem.
> I was going to override the printElementContent() method in XMLOutputter in
> a subclass, but this is not possible as it needs to access some private
> variables.
Hmm... that's another problem. Which specifically caused problems?
> Or maybe change it directly so that new line handling is more consistent for
> element text, and unexpanded entities do not start on new lines?
Yes, I don't see any reason for unexpanded entities to start on new
lines.
> I've gone and done the later, and attached the code for the overriden
> method. Would it be viable to do this? If not any ideas on what else I can
> do?
For simplicity, could you submit this as a unified diff on the file?
"cvs diff -u XMLOutputter.java" or if you're not using CVS then just
diff -u between the old and new versions.
I've CC'd Alex Chaffee since he's most involved in XMLOutputter. Alex,
would you do a sanity check of the patch?
-jh-
More information about the jdom-interest
mailing list