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 <xsl:variable name="startpage" select="/record/page" />
20 <xsl:variable name="endpage" select="/record/endpage" />
22 <!-- Use medium parameter if given. Default to medium from connector -->
23 <xsl:template match="/record">
25 <pz:metadata type="medium">
27 <xsl:when test="string-length($medium)">
28 <xsl:value-of select="$medium" />
31 <xsl:if test="medium">
32 <xsl:value-of select="medium" />
38 <!-- calculate md-pages-number for startpage/endpage -->
39 <xsl:if test="string-length($startpage)">
40 <pz:metadata type="pages-number">
41 <xsl:value-of select="$startpage" />
42 <xsl:if test="string-length($endpage)">
43 <xsl:text>-</xsl:text>
44 <xsl:value-of select="$endpage" />
49 <xsl:apply-templates/>
55 The elements mapped in the following clauses should be kept more
56 or less in sync with those named in builder/templates/search.cft
57 in the "cf" git module.
60 <xsl:template match="date">
61 <pz:metadata type="publication-date">
62 <xsl:value-of select="."/>
64 <pz:metadata type="date">
65 <xsl:value-of select="."/>
69 <xsl:template match="url">
70 <pz:metadata type="electronic-url">
71 <xsl:value-of select="."/>
75 <xsl:template match="title">
76 <pz:metadata type="title">
77 <xsl:value-of select="."/>
79 <pz:metadata type="title-complete">
80 <xsl:value-of select="." />
84 <xsl:template match="journaltitle">
85 <pz:metadata type="journal-title">
86 <xsl:value-of select="."/>
91 According to cf/builder/templates/parseTask.cff, connectors can
92 also generate a "holding" field, but it's not clear how that is
93 different from "item". Perhaps this "item" rule should also
94 handle "holding" in the same way?
97 <xsl:template match="item">
98 <pz:metadata type="due" empty="PAZPAR2_NULL_VALUE">
99 <xsl:value-of select="due"/>
101 <pz:metadata type="locallocation" empty="PAZPAR2_NULL_VALUE">
102 <xsl:value-of select="location"/>
104 <pz:metadata type="callnumber" empty="PAZPAR2_NULL_VALUE">
105 <xsl:value-of select="callno"/>
107 <pz:metadata type="available" empty="PAZPAR_NULL_VALUE">
108 <xsl:value-of select="available"/>
110 <pz:metadata type="publicnote" empty="PAZPAR2_NULL_VALUE">
111 <xsl:value-of select="publicnote"/>
115 <xsl:template match="location">
116 <pz:metadata type="locallocation">
117 <xsl:value-of select="."/>
121 <xsl:template match="callno">
122 <pz:metadata type="callnumber">
123 <xsl:value-of select="."/>
127 <!-- no-op template to avoid printing medium out -->
128 <xsl:template match="medium" />
130 <xsl:template match="volume">
131 <pz:metadata type="volume-number">
132 <xsl:value-of select="."/>
136 <xsl:template match="issue">
137 <pz:metadata type="issue-number">
138 <xsl:value-of select="."/>
142 <xsl:template match="affiliation">
143 <pz:metadata type="affiliation-person" empty="PAZPAR2_NULL_VALUE">
144 <xsl:value-of select="person"/>
146 <pz:metadata type="affiliation-institution" empty="PAZPAR2_NULL_VALUE">
147 <xsl:value-of select="institution"/>
151 <xsl:template match="*" >
152 <pz:metadata type="{local-name()}">
153 <xsl:value-of select="."/>
157 <xsl:template match="text()"/>