← Prev in month ← Prev in thread

XSD error cvc-elt is plain misleading

From
Rick Jelliffe <>
To
xml-dev <>
Date
2018-11-14T01:13:39Z
ID
<>
Thread
XSD error cvc-elt is plain misleading
One of the nice things of XSD is that it enumerates the errors. This then allows the potential causes to be listed, and a tool can then give very specific information. And the developer or user of the schema will then think "Hurray, this is all so easy, I feel so empowered."

So where does it go wrong? I think there is a problem that some of the standard messages actually misdirect attention away from what is useful: they focus on the proximate cause not the efficient cause, IYKWIM.

For example, the most basic error, cvc-elt-1: you can see the typical kinds of description for it here.  It will give you an error like:

cvc-elt.1: Cannot find the declaration of element 'unobtanium'.

But this is misleading.  Most times I get this error, the problem is not that it cannot find a declaration, that is actually another symptom. The problem is that it does not have a schema with a declaration for that element in that namespace.    You should not be detectiving why isn't the declaration showing up in my presumably correct schema, but why don't I have the correct schema.  The user/developer has to go through a WTF cycle rather than just a Whoops instant.

Systems that pretend to report diagnostics (efficient or triggering causes) when they just present more symptoms (proximate cause) are the bane of the computing industry.

Regards
Rick



← Prev in month ← Prev in thread