[Koha-devel] Alternative views for search results and detail pages?

dcook at prosentient.com.au dcook at prosentient.com.au
Mon Feb 17 02:45:20 CET 2020


Hi all,

 

What do people think about replacing the XSLTs with Template Toolkit
templates for search results and detail pages?

 

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. 

 

I'm just trying to think of how we could do views for metadata that aren't
MARC-centric. 

 

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?)

 

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? 

 

David Cook

Systems Librarian

Prosentient Systems

72/330 Wattle St

Ultimo, NSW 2007

Australia

 

Office: 02 9212 0899

Direct: 02 8005 0595

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20200217/3fd1783e/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 484 bytes
Desc: not available
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20200217/3fd1783e/attachment-0001.sig>


More information about the Koha-devel mailing list