Menu

#43 Validation errors should be more descriptive

Bugs
closed-fixed
5
2013-12-12
2006-11-21
Alectrus
No

Environment: Windows XP Professional SP2
Program version: 1.0.8.3

The Problem:

I have an XML file with a root element and a child element. According to the XSD, the child element is required. Let's say I construct my XML file to not include the child element and to only be the root element. This will fail validation. The error message XCE tells me is:

Error at line 1, column 502: Element '{http://www.name.com/documentation/SCP/createMap/input}map' cannot be empty according to the DTD/Schema. Source text: <map xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.name.com/doc/createMap/input" xmlns:yfc="http://www.name.com/doc/createMap/input" xmlns:yfctype="http://www.name.com/doc/types" xsi:schemaLocation="http://www.name.com/doc/createMap/input W:/SCP_createMap_input.xsd" comments="Required" description="Required" mapName="Required" mapType="Required" orgKey="" userName="Required"></map>

While this error gets the point across, it does not tell me what element is missing. Altova tells me this:

The content for element 'map' is incomplete. Expected mandatory element 'uncompiledMap'.

which is more helpful. It would be a great help if XCE could format it's validation error messages in such a way. XCE also sites the source of the error, but I feel that this should not be included and the user should be allowed to click on the error and be taken to where it's located, but that's part of another enhancement idea. This one is for better wording and a clearer format of the validation error messages.

Discussion

  • gnschmidt

    gnschmidt - 2006-11-21

    Logged In: YES
    user_id=1298822
    Originator: NO

    You're absolutely right, of course.

    Hopefully we will have better error descriptions when the application drops MSXML in favour of Xerces. I wonder how Altova arrive at their error description. XMLCE takes its error report from MSXML. Are you sure the context should go? Personally I find it quite useful.

    In general, though, I think the future is Xerces, not least because it offers full XML Schema support on Linux as well as Windows.

     
  • gnschmidt

    gnschmidt - 2008-07-17
    • status: open --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB