Red Hat Bugzilla – Bug 1014451
RFE: better formatting for XML validity errors
Last modified: 2014-03-18 23:37:31 EDT
Description of problem:
When a topic fails XML validation, DocBuilder outputs the LibXML error message but the formatting makes it very hard to read.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Introduce some invalid DocBook in a large section
2. Look at the result in DocBuilder
1. The error message runs a long way off the screen and requires considerable horizontal scrolling. Coupled with the dense nature of these error messages, it makes the output very difficult to read and parse.
2. DocBuilder replaces the "expected" part of the error message with the XML itself. For a long and complex section, actually spotting the XML error is very difficult.
I was going to screenshot all this, but gave up when the horizontal scrolling was 4 screens across and the vertical scrolling was >7 screens.
1. DocBuilder should wrap the validation error
2. DocBuilder should output the "expected" portion of the error to help the user find the error.
Just adding an additional note.
The expected/got part has been looked at briefly before but wasn't resolved, see: BZ#782980
I come across this today so I've fixed part 1 of the expected results in 1.5-SNAPSHOT build 201403191329. The error message is now busted up so that it should be slightly more readable and will also wrap, to stay within the confines of the book.
For part 2, that will require more digging.