1 <?xml version="1.0" encoding="UTF-8"?>
3 This stylesheet expects Connector Frameworks records
7 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
8 xmlns:pz="http://www.indexdata.com/pazpar2/1.0"
9 xmlns:dc="http://purl.org/dc/elements/1.1/"
10 xmlns:siebel="http://loc.gov/siebel/elements/1.0/" >
12 <xsl:output indent="yes"
17 <xsl:param name="medium" />
19 <!-- Use medium parameter if given. Default to medium from connector -->
20 <xsl:template match="/record">
22 <pz:metadata type="medium">
24 <xsl:when test="string-length($medium)">
25 <xsl:value-of select="$medium" />
28 <xsl:if test="medium">
29 <xsl:value-of select="medium" />
34 <xsl:apply-templates/>
39 The elements mapped in the following clauses should be kept more
40 or less in sync with those named in builder/templates/search.cft
41 in the "cf" git module.
44 <xsl:template match="date">
45 <pz:metadata type="publication-date">
46 <xsl:value-of select="."/>
48 <pz:metadata type="date">
49 <xsl:value-of select="."/>
53 <xsl:template match="url">
54 <pz:metadata type="electronic-url">
55 <xsl:value-of select="."/>
59 <xsl:template match="title">
60 <pz:metadata type="title">
61 <xsl:value-of select="."/>
63 <pz:metadata type="title-complete">
64 <xsl:value-of select="." />
68 <xsl:template match="journaltitle">
69 <pz:metadata type="journal-title">
70 <xsl:value-of select="."/>
75 According to cf/builder/templates/parseTask.cff, connectors can
76 also generate a "holding" field, but it's not clear how that is
77 different from "item". Perhaps this "item" rule should also
78 handle "holding" in the same way?
81 <xsl:template match="item">
82 <pz:metadata type="due" empty="PAZPAR2_NULL_VALUE">
83 <xsl:value-of select="due"/>
85 <pz:metadata type="locallocation" empty="PAZPAR2_NULL_VALUE">
86 <xsl:value-of select="location"/>
88 <pz:metadata type="callnumber" empty="PAZPAR2_NULL_VALUE">
89 <xsl:value-of select="callno"/>
91 <pz:metadata type="available" empty="PAZPAR_NULL_VALUE">
92 <xsl:value-of select="available"/>
94 <pz:metadata type="publicnote" empty="PAZPAR2_NULL_VALUE">
95 <xsl:value-of select="publicnote"/>
99 <xsl:template match="location">
100 <pz:metadata type="locallocation">
101 <xsl:value-of select="."/>
105 <xsl:template match="callno">
106 <pz:metadata type="callnumber">
107 <xsl:value-of select="."/>
111 <!-- no-op template to avoid printing medium out -->
112 <xsl:template match="medium" />
114 <xsl:template match="*" >
115 <pz:metadata type="{local-name()}">
116 <xsl:value-of select="."/>
120 <xsl:template match="text()"/>