This patch adds the option to pass a code string to the XSLT handler object instead of passing a filename. This is achieved by a change to parameter hashref. The old style parameters are also allowed. Note that this patch should not change behavior but will be used in future development: it will allow an easy workaround for bug 12758 and is needed by bug 12754 to apply stored xslt code.
Created attachment 31864 [details] [review] Bug 12973: Allow passing code to XSLT_Handler instead of filename This patch adds the option to pass a code string to the XSLT handler object instead of passing a filename. This is achieved by a change to parameter hashref. The old style parameters are also allowed. Note that this patch should not change behavior but will be used in future development: see bug 12758 or bug 12754. Test plan: Verify that behavior did not change in the following steps. [1] Edit OPACXSLTResultsDisplay in order to use XSLT. [2] Check search results page in OPAC. [3] Edit OPACXSLTDetailsDisplay in order to use XSLT. [4] Check detail page in OPAC.
Created attachment 31865 [details] [review] Bug 12973: Additional unit tests for XSLT_Handler.t The additional way of parameter passing is tested in three additional tests. Test plan: Verify if XSLT_Handler.t passes.
Created attachment 33553 [details] [review] [Signed Off] Bug 12973: Allow passing code to XSLT_Handler instead of filename This patch adds the option to pass a code string to the XSLT handler object instead of passing a filename. This is achieved by a change to parameter hashref. The old style parameters are also allowed. Note that this patch should not change behavior but will be used in future development: see bug 12758 or bug 12754. Test plan: Verify that behavior did not change in the following steps. [1] Edit OPACXSLTResultsDisplay in order to use XSLT. [2] Check search results page in OPAC. [3] Edit OPACXSLTDetailsDisplay in order to use XSLT. [4] Check detail page in OPAC. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 33554 [details] [review] [Signed Off] Bug 12973: Additional unit tests for XSLT_Handler.t The additional way of parameter passing is tested in three additional tests. Test plan: Verify if XSLT_Handler.t passes. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Works for me, no regressions. Tests all pass, and code passes qa scripts, happy to sign off.
Created attachment 34352 [details] [review] [PASSED QA] Bug 12973: Allow passing code to XSLT_Handler instead of filename This patch adds the option to pass a code string to the XSLT handler object instead of passing a filename. This is achieved by a change to parameter hashref. The old style parameters are also allowed. Note that this patch should not change behavior but will be used in future development: see bug 12758 or bug 12754. Test plan: Verify that behavior did not change in the following steps. [1] Edit OPACXSLTResultsDisplay in order to use XSLT. [2] Check search results page in OPAC. [3] Edit OPACXSLTDetailsDisplay in order to use XSLT. [4] Check detail page in OPAC. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 34353 [details] [review] [PASSED QA] Bug 12973: Allow passing code to XSLT_Handler instead of filename This patch adds the option to pass a code string to the XSLT handler object instead of passing a filename. This is achieved by a change to parameter hashref. The old style parameters are also allowed. Note that this patch should not change behavior but will be used in future development: see bug 12758 or bug 12754. Test plan: Verify that behavior did not change in the following steps. [1] Edit OPACXSLTResultsDisplay in order to use XSLT. [2] Check search results page in OPAC. [3] Edit OPACXSLTDetailsDisplay in order to use XSLT. [4] Check detail page in OPAC. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 34354 [details] [review] [PASSED QA] Bug 12973: Additional unit tests for XSLT_Handler.t The additional way of parameter passing is tested in three additional tests. Test plan: Verify if XSLT_Handler.t passes. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 35345 [details] [review] Bug 12973: (QA followup) warnings are features, test them This patch makes the test look for the warnings Koha::XSLT_Handler raises instead of just throwing them to STDERR. Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Enhancement pushed to master. Thanks Marcel! PS Maybe we should fill a bug for removing to old API, as the new one makes a lot of sense and this patches don't target the stable branches.