misleading information on well-formedness errors

Are you missing a feature? Request its implementation here.
Syd
Posts: 3
Joined: Fri Dec 24, 2010 5:45 pm

misleading information on well-formedness errors

Post by Syd »

While editing an XML-like document that has a well-formedness error, oXygen usefully gives a red squiggly underline at (or at least near) the problem and gives an error message (from Xerces, I think) at the bottom of the editing window (just above the Text and Grid tabs); furthermore it may make the GI of the element that contains the error red in the breadcrumb trail immediately above the editing area, and might turn some characters in the encoding area red (e.g. ‘&’ followed by something illegal). But the important bit (for this post) is the error summary near the middle of the very bottom row of the window. It says “Validation failed. Errors: 1”. If I request well-formedness checking it changes to “Well-formedness test - failed. Errors: 1”.

So far all is well and good (except for the minor issue that it starts out by saying it is a validation error when it really is a well-formedness error; but it is not lying — validation did fail). But if my XML-like document has 2+ well-formedness errors, the message at the bottom still says “Errors: 1”. I kinda understand why it says there is only one error … per the XML spec, upon coming across a well-formedness error normal processing stops, and an application is not at all required to continue. But it still strikes me as misleading.

How about dropping the error count and displaying “Document NOT well-formed!” or some such in red?
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: misleading information on well-formedness errors

Post by Radu »

Hi,
Oxygen uses the Xerces Java parser to validate XML documents.
There are various situations, this situation for example:

Code: Select all

<root>&a &b </root>
is encountered as an error in a low level "scanner" stage and once the parser encounters "&" but does no longer encounter ";" it can no longer recuperate and it reports only one error, the first one, considering the entire document content following the first & as broken and not parsable.
This situation:

Code: Select all

<root>&abc; &bcd; </root>
is encountered later on, the entities are properly referenced but are not defined, so in this case the validation will report multiple errors.
For now we do not have that fine control granularity to determine all such cases and split them in categories when the entire document is skipped after an error is encountered or not. I would suggest fixing the errors one by one as they are reported for now.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply