Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 362033 - Line breaks in serialized XML are handled poorly for the first element
Summary: Line breaks in serialized XML are handled poorly for the first element
Status: CLOSED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: XML/XMI (show other bugs)
Version: 2.8.0   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Ed Merks CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-26 03:59 EDT by Ed Merks CLA
Modified: 2011-11-22 05:26 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Merks CLA 2011-10-26 03:59:49 EDT
There are several problems.

Firstly, when a mark is made (for inserting namespace declarations that can't be determined until the document is fully processed) the current line width is set so that the next attribute to be serialized will always break the line.  So the first line is often shorter than it could/should be.

Also, when inserting the namespace declarations, the width of the line at the start of which it is to be inserted isn't remembered, so the last line of the insertion is often too long.

Of course any line be too long, but it's better to minimize that.  In particular, it's nice to be able to force every attribute onto a different line with a very short line width setting.
Comment 1 Ed Merks CLA 2011-10-26 04:05:13 EDT
The changes are committed to CVS for 2.8.
Comment 2 Ed Merks CLA 2011-11-22 05:26:26 EST
The changes are available in builds.