<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:DengXian;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"\@DengXian";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-AU link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoNormal>Hi all,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>What do people think about replacing the XSLTs with Template Toolkit templates for search results and detail pages?<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Considering that the OPAC Detail XSLT is 2000 lines and the Search Result XSLT is 1500 lines (and that doesn’t include the utility XSLT) maybe that’s a bit ambitious. The Intranet Search results are 1000 lines and Intranet Detail is 1600 lines. <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I’m just trying to think of how we could do views for metadata that aren’t MARC-centric. <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Actually, after reviewing the XSLTs, I suppose there’s no reason we couldn’t expand the XSLTs to include more metadata schema options. We could actually provide any XML and then just do an XSLT template to render it. (After looking at Koha::SearchEngine::Elasticsearch::Search, it looks like we’re storing whole MARCXML records in Elasticsearch, and that’s what we’re fetching from Elasticsearch for Koha to render for views?)<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Looking at biblio-zebra-indexdefs.xsl and really we could hand that arbitrary XML to index as well… and then worry about C4::Search::getRecords() stuffing the Zebra raw record into the result data structure and C4::Search::searchResults assuming it’s a MARCXML record. It’s too bad MARC::Record::XML doesn’t check for a XML::LibXML object before trying to parse, or we could parse the XML and then just hand the relevant XML to MARC::Record. I mean we could still do that but it would involve double-parsing, which would be a performance hit. Although I imagine Galen wouldn’t necessarily be opposed to accepting an update. I mean it would basically be adding the same functionality to Zebra that we have with Elasticsearch, no? <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>David Cook<o:p></o:p></p><p class=MsoNormal>Systems Librarian<o:p></o:p></p><p class=MsoNormal>Prosentient Systems<o:p></o:p></p><p class=MsoNormal>72/330 Wattle St<o:p></o:p></p><p class=MsoNormal>Ultimo, NSW 2007<o:p></o:p></p><p class=MsoNormal>Australia<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Office: 02 9212 0899<o:p></o:p></p><p class=MsoNormal>Direct: 02 8005 0595<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>