Has anybody written an SRU to HTML stylesheet? Implementing Koha’s public Z39.50 server was as easy as uncommenting a few lines in koha-conf.xml. Tastes great. Less filling. Thanks! SRU then comes for free. Double thanks!! Search results against the SRU interface return raw MARCXML. While this is informative, it is not usable. I know I can create an XSL file to transform the SRU results into something more readable, and I know I can specify this XSL in the SRU URL. But before I go there I’m wondering: 1. Is there some additional configuration on the server side allowing me to display results more beautifully? 2. Has somebody else written an XSL file to transform the MARCXML into something more readable? — Eric Morgan
Eric Lease Morgan schreef op za 12-07-2014 om 14:53 [-0400]:
Search results against the SRU interface return raw MARCXML. While this is informative, it is not usable. I know I can create an XSL file to transform the SRU results into something more readable, and I know I can specify this XSL in the SRU URL. But before I go there I’m wondering:
1. Is there some additional configuration on the server side allowing me to display results more beautifully?
2. Has somebody else written an XSL file to transform the MARCXML into something more readable?
I don't know about this specific use case, but there are some XSLT files for taking marcxml and displaying the search results and detail pages that come along with koha. These may be a good place to look to start with, as they also refer to some utility libraries which'd be handy to know about if you were going to make your own. -- Robin Sheat Catalyst IT Ltd. ✆ +64 4 803 2204 GPG: 5FA7 4B49 1E4D CAA4 4C38 8505 77F5 B724 F871 3BDF
I asked:
1. Is there some additional configuration on the server side allowing me to display results more beautifully?
2. Has somebody else written an XSL file to transform the MARCXML into something more readable?
Well, it seems as if I wrote such a stylesheet five years ago. Duh!! And now if I could only get Koha/Zebrasrv to load it. In 2008 I played a lot with Zebra. I used it to index MARC records from the HathiTrust as well as my Alex Catalogue. I also used it to explore the possibilities of SRU. Along the way I wrote a stylesheet to transform MARCXML embedded in an SRU response into HTML. [1] The result was a really brain-dead search interface I called MBooks. [2] The raw SRU MBooks output is exactly the same as the raw SRU output from Koha. [3] But when I add the stylesheet parameter to my SRU query and pointing to my XSL file, zebrasrv always returns the SRU explain response as the stylesheet. The stylesheet is seemingly not found. [4] What am I doing incorrectly? Where should I save my XSL file so the SRU interface can find it? [1] stylesheet - http://infomotions.com/tmp/mbooks.txt [2] MBooks - http://infomotions.com/sandbox/mbooks/ [3] Koha SRU - http://infomotions.com/tmp/koha-sru.html [4] not found - http://bit.ly/1nnLJVN — Eric Morgan
On Jul 14, 2014, at 9:44 AM, Eric Lease Morgan <eric_morgan@infomotions.com> wrote:
1. Is there some additional configuration on the server side allowing me to display results more beautifully?
2. Has somebody else written an XSL file to transform the MARCXML into something more readable?
What am I doing incorrectly? Where should I save my XSL file so the SRU interface can find it?
Resolved. After looking more closely at my older MBooks zebrasrv configuration file, I discovered that I needed to add a docpath element to my newer Koha configuration file. [0] The relevant portion of my koha-conf.xml file follows: <server id="publicserver" listenref="publicserver"> <directory>/etc/koha/zebradb/biblios</directory> <docpath>etc</docpath> <config>/etc/koha/zebradb/zebra-biblios-dom.cfg</config> <cql2rpn>/etc/koha/zebradb/pqf.properties</cql2rpn> <xi:include href="/etc/koha/zebradb/retrieval-info-bib-dom.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> <xi:include href="/etc/koha/zebradb/explain-biblios.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> </server> Thusly zebrasrv knows to look in /etc/koha/zebradb/biblios/etc for documents — like my stylesheet -- when needed. Here are two relevant links: 1. My now human-readable SRU interface. [1] 2. The tiny tweaked XSL [2] Fun with open source software! Next, it is off to learn about Koha and OAI-PMH. [0] Alas, I asked this once before - http://lists.indexdata.dk/pipermail/zebralist/2007-November/001803.html [1] SRU - http://infomotions.com/tmp/koha-sru.html [2] stylesheet - http://infomotions.com/tmp/mbooks.txt — Eric Morgan
participants (2)
-
Eric Lease Morgan -
Robin Sheat