xmltools icon indicating copy to clipboard operation
xmltools copied to clipboard

Validation reporting options?

Open DavidHaslam opened this issue 5 years ago • 5 comments

XMLTools used to report all validation fails, albeit the reporting dialog was not ideal.

Now it just stops at the first validation error line and describes how something on that line was wrong.

However, there seems to be no means to copy the yellow background reported text to the clipboard.

It may be worth considering the following idea.

Provide an option to choose either

  • Stop at first validation error (as it currently does), or
  • Report all validation errors and copy the results to the clipboard.

This would give the XML file developer a feel for the magnitude of the task.

It would also provide insights to systematic repeated errors of the same kind.

DavidHaslam avatar Apr 30 '20 12:04 DavidHaslam

See also earlier issue #5 now just closed.

DavidHaslam avatar May 05 '20 10:05 DavidHaslam

Hi,

XMLTools options have been extended in pre-version 3.0.5.0. It allows now to activate multiple error messages, which should help you to have an overview of all encountered validation errors.

When annotations mode is enabled, all errors are displayed as yellow/red annotation in the xml document. When annotations mode is disabled, all errors appear in a separate alert dialog. This is not ideal and I'll replace this by a multiline-text dialog (with copy-to-clipboard command)

I'll work on this asap.

morbac avatar May 05 '20 13:05 morbac

Looking good! Thanks for the response.

DavidHaslam avatar May 05 '20 13:05 DavidHaslam

Further request:

If XMLTools has stopped to display a validation error with the red data on the yellow background lines, the displayed error message should ideally be cleared if you initiate a further validation test, whether or not you've edited the file in an attempt to make it conform to the schema requirements.

Likewise, if you had edited a saved file and made a few changes, and you then test XML Validation, and it fails, the error lines should be cleared if you click Undo in the main Notepad++ Edit menu or the Undo icon in the Toolbar.

DavidHaslam avatar May 05 '20 17:05 DavidHaslam

An odd behaviour sometimes observed is when

Not enough storage is available to complete this operation.

The 2 yellow lines can appear above (e.g.) line 202, but the error message first part is always

XML Validation error - line 0 pos 0:

and the cursor jumps to the start of the file accordingly!

Is there any way to make this a smoother result?

DavidHaslam avatar May 05 '20 17:05 DavidHaslam