Wednesday, 19 September 2012

Improving the quality of XML content errors in Maestro

XML resource content model violations are a rarity in Maestro.

The Generic XML resource editor does client-side validation to ensure valid XML is sent back to the MapGuide Server. The specialized editors and APIs in Maestro will ensure that the minimum content model requirements for any given resource type are satisfied. But sometimes, we may have missed something and when that happens, having this error thrown at your face and displayed through the normal generic error dialog is not really helpful.

So with such errors (should they occur), you really want to see the offending XML content that triggered the error, and it just so happens that in the next beta of Maestro (and next 4.0.x stable release), we now have a specialized dialog just for displaying this particular class of errors.

So if you scroll down to line 491 of the XML content as indicated by the error details, you'll find that Maestro was not correctly building the minimum content model required for a particular fusion widget (which has been subsequently fixed thanks to this new feature)

Like I already mentioned, such errors are a rarity and should not be happening. But at least now if/when such errors do happen you now have the offending XML on hand to explain why it happened, which will greatly help me to ensure such cases never happen again in the future.

1 comment:

Chris said...

I find this very useful.
I often got these "unmeaningful" xml-exceptions when e.g. duplicating / modifying maps in xml.
Seeing the place in the xml document where the error occurs is very helpful,
looking forward to that 4.x stable version!
keep up the great work, and
best regards from switzerland.