| Summary: | XML formatter inserts newline in XML header | ||
|---|---|---|---|
| Product: | [WebTools] WTP Source Editing | Reporter: | Matthew Adams <matthew> |
| Component: | wst.xml | Assignee: | Rakesh <rakes123> |
| Status: | RESOLVED WORKSFORME | QA Contact: | Nitin Dahyabhai <thatnitind> |
| Severity: | normal | ||
| Priority: | P3 | CC: | nsand.dev, pwebster |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
I am not able to reproduce it on I20100520-0800 build .What preferences are enabled in XML->XML Files->editor? (In reply to comment #1) > I am not able to reproduce it on I20100520-0800 build .What preferences are > enabled in XML->XML Files->editor? I think I've changed my settings since I first noticed the error and don't recall what they were when this first took place -- this formatting was going on unknowingly by us for some time before we discovered it. The fact that it was happening on when editing Maven POM files in the POM editor might have something to do with it. With my current settings, I cannot reproduce the behavior either now. :( Resolving it , since it is not reproducible.Please reopen if you are able to reproduce. |
Build Identifier: M20100211-1343 If an xml file has a header of the form <?xml version="1.0" encoding="UTF-8"?> and the user formats it (Shift-Ctrl-F), the formatter inserts a newline in the xml header such that it looks like <?xml version="1.0" encoding="UTF-8"?> Inserting the newline causes many parsers (like the one Ivy uses) to throw an exception. Regardless of the formatter's settings, it should ensure to leave the standard xml header element on a single line. Reproducible: Always Steps to Reproduce: 1. Create an xml document with a header of <?xml version="1.0" encoding="UTF-8"?> 2. Format it. 3. Observe newline between the version and encoding attributes.