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" />
20 According to cf/builder/templates/parseTask.cff, connectors can
21 also generate a "medium" field, but that is ignored in this
22 stylesheet, the rule below instead using an XSLT parameter.
23 Should the data element be used in preference when it is included?
26 <xsl:template match="/record">
28 <pz:metadata type="medium">
30 <xsl:when test="string-length($medium)">
31 <xsl:value-of select="$medium" />
34 <xsl:if test="medium">
35 <xsl:value-of select="medium" />
40 <xsl:apply-templates/>
45 The elements mapped in the following clauses should be kept more
46 or less in sync with those named in builder/templates/search.cft
47 in the "cf" git module.
50 <xsl:template match="date">
51 <pz:metadata type="publication-date">
52 <xsl:value-of select="."/>
54 <pz:metadata type="date">
55 <xsl:value-of select="."/>
59 <xsl:template match="url">
60 <pz:metadata type="electronic-url">
61 <xsl:value-of select="."/>
65 <xsl:template match="title">
66 <pz:metadata type="title">
67 <xsl:value-of select="."/>
69 <pz:metadata type="title-complete">
70 <xsl:value-of select="." />
74 <xsl:template match="journaltitle">
75 <pz:metadata type="journal-title">
76 <xsl:value-of select="."/>
81 According to cf/builder/templates/parseTask.cff, connectors can
82 also generate a "holding" field, but it's not clear how that is
83 different from "item". Perhaps this "item" rule should also
84 handle "holding" in the same way?
87 <xsl:template match="item">
88 <pz:metadata type="due" empty="PAZPAR2_NULL_VALUE">
89 <xsl:value-of select="due"/>
91 <pz:metadata type="locallocation" empty="PAZPAR2_NULL_VALUE">
92 <xsl:value-of select="location"/>
94 <pz:metadata type="callnumber" empty="PAZPAR2_NULL_VALUE">
95 <xsl:value-of select="callno"/>
97 <pz:metadata type="available" empty="PAZPAR_NULL_VALUE">
98 <xsl:value-of select="available"/>
100 <pz:metadata type="publicnote" empty="PAZPAR2_NULL_VALUE">
101 <xsl:value-of select="publicnote"/>
105 <xsl:template match="location">
106 <pz:metadata type="locallocation">
107 <xsl:value-of select="."/>
111 <xsl:template match="callno">
112 <pz:metadata type="callnumber">
113 <xsl:value-of select="."/>
117 <!-- no-op template to avoid printing medium out -->
118 <xsl:template match="medium" />
120 <xsl:template match="*" >
121 <pz:metadata type="{local-name()}">
122 <xsl:value-of select="."/>
126 <xsl:template match="text()"/>