Thanks! And to correct another typo for the record, I'm sending
fragments, not fragmenents, which I guess is a back-formation from
documenents.
Leigh.
-----Original Message-----
From: tagsoup-friends@yahoogroups.com
[mailto:tagsoup-friends@yahoogroups.com] On Behalf Of John Cowan
Sent: Thursday, March 12, 2009 3:34 PM
To: tagsoup-friends@yahoogroups.com
Subject: Re: [tagsoup-friends] Patch for XMLWriter and newlines in
TagSoup 1.2
Klotz, Leigh scripsit:
> In tests, I'm seeing not just a newline, but a blank line after the
> document. Is that what you see? Your quoted simple output looks like
> it might have a blank line after it.
Yes, you're right. I've never paid attention to this before.
> * Problem 2:
> I've violated an assumption of XMLWriter; I'm sending it fragmenents,
> not a document or even a single element. The result is a newline
> after each "toplevel" element.
Aha.
> Given that endDocument() outputs the final newline in the document, I
> really don't see what benefit line 632 has at all. I believe that
> simply removing line 632 will let XMLWriter handle fragments without
> introducing extra whitespace, and will still leave the resulting
> serialization newline (though not blank line) terminated.
I agree: line 632 should just be flushed.
--
Clear? Huh! Why a four-year-old child John Cowan
could understand this report. Run out cowan@...
and find me a four-year-old child. I
http://www.ccil.org/~cowan
can't make head or tail out of it.
--Rufus T. Firefly on government reports