1 / 22

Improving OPAC Displays Through XSLT A Koha Success Story

Improving OPAC Displays Through XSLT A Koha Success Story. Sam Cook, Public Services Librarian Allen Library, University of Hartford. NEMLA Spring Meeting May 10, 2013. Improving OPAC Displays Through XSLT. A Sample Item. Improving OPAC Displays Through XSLT. How it is Cataloged.

tessa
Télécharger la présentation

Improving OPAC Displays Through XSLT A Koha Success Story

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Improving OPAC Displays Through XSLT A Koha Success Story Sam Cook, Public Services Librarian Allen Library, University of Hartford NEMLA Spring Meeting May 10, 2013

  2. Improving OPAC Displays Through XSLT A Sample Item

  3. Improving OPAC Displays Through XSLT How it is Cataloged 100 1 _aBeethoven, Ludwig van, _d1770-1827 240 10 _aConcertos, _mViolin, orchestra, _nop. 61, _rD major 700 12 _aBrahms, Johannes, _d1833-1897 _tConcertos, _mviolin, orchestra, _nop. 77, _rD major

  4. Improving OPAC Displays Through XSLT How it is Normally Displayed

  5. Improving OPAC Displays Through XSLT How Koha Normally Displays It

  6. Improving OPAC Displays Through XSLT Hartford’s OPAC Display

  7. Improving OPAC Displays Through XSLT Koha: A Brief History 2009 2005 2010 1999 1999: Koha created in New Zealand 2009: WALDO consortium goes live with Koha 2005: Liblime is founded in Ohio 2010: LibLime purchased by PTFS

  8. Improving OPAC Displays Through XSLT XSLT Begins January 2012: Customizable XSLT added to LibLime Academic Koha. There was much rejoicing.

  9. Improving OPAC Displays Through XSLT What is XSLT? MARC 100 10 $aCopland, Aaron, $d1900-1990. <datafield tag="100" ind1="1" ind2="0"> <subfield code="a">Copland, Aaron,</subfield> <subfield code="d">1900-1990.</subfield> </datafield> MARCXML XSLT <h5 class="author">By Copland, Aaron, 1900-1990.</h5> HTML

  10. Improving OPAC Displays Through XSLT What does it look like? <xsl:if test="marc:datafield[@tag=100]"> <h5 class="author"> By <xsl:for-each select="marc:datafield[@tag=100]”> <xsl:value-of select="marc:subfield[@code='a']"/> <xsl:value-of select="marc:subfield[@code='d']"/> </xsl:for-each> </h5> </xsl:if> 1 2 3 4 5 6 7 8 9 Translates to… If there is a 100 field, do this: Enter an <h5> HTML tag with class of author Enter the word “By” For every 100 field (ever though there is only one) do this: Insert the subfield a Insert the subfield d Stop repeating lines 5 and 6 for every 100 field Enter a </h5> HTML end tag The if statement is over 1 2 3 4 5 6 7 8 9

  11. Improving OPAC Displays Through XSLT If/Then Statement Examples Ifs Thens • If this is a sound recording… • If this record has a 240 field… • If this field has a subfield t… • If this is an RDA record… • If the text in this field matches text in the previous field… • If the first indicator is 1… • If the 100 field has the word “Batman” in it… • … then use this font style. • … then remove this text. • … then enter this text. • … then leave out this field. • … then link this using the text in this other subfield. • … then insert this HTML. • … then display the subfields in this order. • … then insert a Batman logo.

  12. Improving OPAC Displays Through XSLT Title (245) • Changes made: • Added 245 subfield c • Put 245 subfields in order they are cataloged in, rather than in a specified order • Removed everything from subfield h for sound recordings except for forward slash (/)

  13. Improving OPAC Displays Through XSLT Controlled Names & Name/Titles (1XX/240, 7XX) • Changes made: • Placed 1XX with 240 • Placed 1XX/240 with name/title 7XXs • Line breaks between name/titles to make it easier to read • Separated name-only 7XXs into their own list • Included all subfields in proper order

  14. Improving OPAC Displays Through XSLT Subjects (6XX) • Changes made: • Placed subjects in vertical list to make them easier to read • Made links sensitive to what portion of subject is clicked on (required some javascript)

  15. Improving OPAC Displays Through XSLT Results Page Title/Author • Changes made: • Included (nearly) complete 245 in title line • Removed everything from subfield h except for forward slash (/) • If item is a sound recording with a 245 $c, it no longer includes “by” line • Added 511 performer note instead of 7XXs

  16. Improving OPAC Displays Through XSLT Results Page Author • Changes made: • Consolidated author entries

  17. Improving OPAC Displays Through XSLT Results Page Item Format • Changes made: • Replaced generic “sound disc” format with more specific CD or LP designation • Modified icon to reflect proper format • Removed “Literary form” from sound recordings

  18. Improving OPAC Displays Through XSLT Results Page Availability • Changes made: • Made sure all items were accounted for • Clarified withdrawn vs. available status • Added easy to browse through icons showing overall availability

  19. Improving OPAC Displays Through XSLT Live Demo!!!

  20. Improving OPAC Displays Through XSLT Why This Matters This is not an attempt to promote Koha. This shows a model for how systems should be handling displays. There is no more begging for individual fields and subfields to display. Different systems that use customizable XSLT could theoretically share the code

  21. Improving OPAC Displays Through XSLT How to Learn XSLT • My tutorial at: http://libill.hartford.edu/koha/docs/koha_XSLT_howto.pdf • Tutorials at w3schools:XSLT: http://www.w3schools.com/xsl/XPATH: http://www.w3schools.com/xpath/default.asp • Google searches

  22. And thus concludes this presentation. Questions?

More Related