Bug 11826: Add XSLT handler object to Koha namespace
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Fri, 21 Feb 2014 16:20:29 +0000 (17:20 +0100)
committerGalen Charlton <gmc@esilibrary.com>
Mon, 26 May 2014 03:52:28 +0000 (03:52 +0000)
commit41caa8e970034337ad36b376c50de2b0ccc6a14a
tree36c3b21d5de872136eee0200a4bb87160b3107d7
parent1f5e92fec68a98806f355204a8b48178396c51da
Bug 11826: Add XSLT handler object to Koha namespace

In achieving the goals of umbrella report 6536 (Z3950 improvements), this
report adds a XSLT handler object to the Koha namespace.
A follow-up adds unit tests for this module.
This patch does not yet incorporate the new object into Z3950 search. So
it does not change any behavior and is therefore harder to test.

Test plan:
Run the unit tests of the follow-up patch on report 11826.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
I tested the new module in two additional ways:

[1] Made a simple script (four lines as below) that ran a larger xml file
    with 1500 records through a test XSLT file modifying the title.

    my $eng= Koha::XSLT_Handler->new;
    open my $fh1, '<', '_example_file';
    my @xml= <$fh1>;
    print $eng->transform( join('', @xml), '_example_xsl_file');

[2] Incorporated the object into my local changes of Breeding.pm (based on
    older work, not ready for submittal now).
    Ran transformation on Z3950 search results. Worked well :)

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Test runs Ok. No koha-qa errors.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Koha/XSLT_Handler.pm [new file with mode: 0644]