1 <?xml version="1.0" encoding="UTF-8"?>
4 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
5 xmlns:pz="http://www.indexdata.com/pazpar2/1.0"
6 xmlns:marc="http://www.loc.gov/MARC21/slim">
8 <xsl:import href="marc21.xsl"/>
10 <xsl:output indent="yes" method="xml" version="1.0" encoding="UTF-8"/>
12 <!-- Extract metadata from OPAC records with embedded MAR records
13 http://www.loc.gov/marc/bibliographic/ecbdhome.html
16 <xsl:template name="record-hook">
17 <xsl:for-each select="/opacRecord/holdings/holding">
18 <pz:metadata type="locallocation">
20 <xsl:when test="localLocation">
21 <xsl:value-of select="localLocation"/>
23 <xsl:otherwise>PAZPAR2_NULL_VALUE</xsl:otherwise>
26 <pz:metadata type="callnumber">
28 <xsl:when test="callNumber">
29 <xsl:value-of select="callNumber"/>
31 <xsl:otherwise>PAZPAR2_NULL_VALUE</xsl:otherwise>
34 <pz:metadata type="publicnote">
36 <xsl:when test="publicNote">
37 <xsl:value-of select="publicNote"/>
39 <xsl:otherwise>PAZPAR2_NULL_VALUE</xsl:otherwise>
42 <pz:metadata type="available">
44 <xsl:when test="circulations/circulation/availableNow/@value = '1'">
47 <xsl:when test="circulations/circulation/availableNow/@value = '0'">
49 <xsl:when test="circulations/circulation/availabiltyDate">
50 <xsl:value-of select="circulations/circulation/availabiltyDate"/>
52 <xsl:otherwise>PAZPAR2_NULL_VALUE</xsl:otherwise>
55 <xsl:otherwise>PAZPAR2_NULL_VALUE</xsl:otherwise>
61 <xsl:template match="/">
63 <xsl:when test="opacRecord">
64 <xsl:apply-templates select="opacRecord/bibliographicRecord"/>
67 <xsl:apply-templates/>