Koha/koha-tmpl/opac-tmpl/bootstrap/en/includes/xslt-handler.inc
Marcel de Rooy f253c72bc3 Bug 20272: Changes for Breeding.pm and Record.pm
In Breeding.pm we let Z3950Search return the xslt handler error codes back
to the template. They are converted to text messages by using an new include
file (added for opac and intranet now). The generic xslt_err code is now
obsoleted.

In Record.pm the errstr call is removed. The croak is done with the new
error code in err. This seems sufficient.

Test plan:
[1] Run Breeding.t
[2] Run Record.t
[3] Add a nonexisting xslt file to one of your Z3950 targets. Search on that
    target and check if you see a error 'XSLT file not found'.

The bonus is these error messages are now translatable as they are in
the templates

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-07-02 12:12:49 +00:00

16 lines
545 B
PHP

[% SWITCH code %]
[% CASE 'XSLTH_ERR_NO_FILE' %]
No XSLT file passed.
[% CASE 'XSLTH_ERR_FILE_NOT_FOUND' %]
XSLT file not found.
[% CASE 'XSLTH_ERR_LOADING' %]
Error while loading stylesheet.
[% CASE 'XSLTH_ERR_PARSING_CODE' %]
Error while parsing stylesheet.
[% CASE 'XSLTH_ERR_PARSING_DATA' %]
Error while parsing input.
[% CASE 'XSLTH_ERR_TRANSFORMING' %]
Error while transforming input.
[% CASE 'XSLTH_NO_STRING_PASSED' %]
No string to transform.
[% END %]