DSpace/DSpace — pull request #459 by tdonohue (2014-01-29 18:49:27+00:00)
Title: DS-1596 fix : Display error messages in your XMLUI theme (currently Mirage only)

PLEASE DO NOT MERGE THIS PR YET. It currently only fixes DS-1596 for the "Mirage" theme. Unfortunately, it looks like each theme will require its own specific fix.

https://jira.duraspace.org/browse/DS-1596

A basic overview of the fix:
* Adds a new "" section to the Mirage 'sitemap.xmap'. This section *overrides* the default ugly DSpace error page, and applies the Mirage theme to the error message.
* Creates a new "exception2dri.xslt" stylesheet. This stylesheet transforms a Cocoon XML error message into a valid DRI document, so that your Theme can then be used to display the error.
* NOTE: not all errors are guaranteed to be displayed within your Theme. Most will be (e.g. 404 Page Not Found). However, if a significant internal error occurs or a Theme error occurs, you still may see the ugly default DSpace error page.
* Also note, I've also made some formatting/refactoring changes to the Mirage sitemap.xmap (which is why the diff is so huge). These changes make the file much more human readable (and I've added addition comments to help explain what is going on).

In order to fully fix DS-1596 however, we will need to make similar changes to *every* XMLUI Theme's sitemap.xmap.

TESTING is welcome! Again, this currently only works for Mirage.