Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 362033

Summary: Line breaks in serialized XML are handled poorly for the first element
Product: [Modeling] EMF Reporter: Ed Merks <Ed.Merks>
Component: XML/XMIAssignee: Ed Merks <Ed.Merks>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 2.8.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

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.