Opened 13 years ago

Closed 13 years ago

#441 closed enhancement (fixed)

Validation report / Improve XSD error message

Reported by: fxp Owned by: fxp
Priority: minor Milestone: v2.7.0
Component: General Version: v2.6.2
Keywords: Cc:

Description

Currently, XSD error are displayed to end user as produced by the parser.

eg.

cvc-complex-type.2.4.a: Invalid content was found starting with 
element 'gmd:dateType'. One of 
'{"http://www.isotc211.org/2005/gmd":date}' is expected. (Element: 
gmd:dateType with parent element: gmd:CI_Date)

The idea is to transform those messages to a more user friendly message for common error messages in the editor:

  • invalid data type (datatype-valid.1.2.1)
  • invalid content (complex-type.2.4.a)
  • missing element (complex-type.2.4.b)
  • Type error (cvc-type.3.1.3)

The transformation consists of:

The above exemple will result to the following message in French:

 Élément invalide. Contenu invalide pour l'élément : Type de date 
(gmd:dateType). Un des éléments suivants (gmd:date) est attendu. 
L'élément parent est Date (gmd:CI_Date). L'erreur XSD complète est :
 Invalid content was found starting with element 'gmd:dateType'. 
One of '{"http://www.isotc211.org/2005/gmd":date}' is expected. 
(Element: gmd:dateType with parent element: gmd:CI_Date) (complex-
type.2.4.a)

See screenshot.

Attachments (2)

validation-xsd-tranlate.png (99.1 KB ) - added by fxp 13 years ago.
translate-xsd-error.patch (12.8 KB ) - added by fxp 13 years ago.

Download all attachments as: .zip

Change History (3)

by fxp, 13 years ago

Attachment: validation-xsd-tranlate.png added

by fxp, 13 years ago

Attachment: translate-xsd-error.patch added

comment:1 by fxp, 13 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.