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">
29 <xsl:value-of select="$medium" />
31 <xsl:apply-templates/>
36 The elements mapped in the following clauses should be kept more
37 or less in sync with those named in builder/templates/search.cft
38 in the "cf" git module.
41 <xsl:template match="date">
42 <pz:metadata type="publication-date">
43 <xsl:value-of select="."/>
45 <pz:metadata type="date">
46 <xsl:value-of select="."/>
50 <xsl:template match="url">
51 <pz:metadata type="electronic-url">
52 <xsl:value-of select="."/>
56 <xsl:template match="title">
57 <pz:metadata type="title">
58 <xsl:value-of select="."/>
60 <pz:metadata type="title-complete">
61 <xsl:value-of select="." />
65 <xsl:template match="journaltitle">
66 <pz:metadata type="journal-title">
67 <xsl:value-of select="."/>
72 According to cf/builder/templates/parseTask.cff, connectors can
73 also generate a "holding" field, but it's not clear how that is
74 different from "item". Perhaps this "item" rule should also
75 handle "holding" in the same way?
78 <xsl:template match="item">
79 <pz:metadata type="due" empty="PAZPAR2_NULL_VALUE">
80 <xsl:value-of select="due"/>
82 <pz:metadata type="locallocation" empty="PAZPAR2_NULL_VALUE">
83 <xsl:value-of select="location"/>
85 <pz:metadata type="callnumber" empty="PAZPAR2_NULL_VALUE">
86 <xsl:value-of select="callno"/>
88 <pz:metadata type="available" empty="PAZPAR_NULL_VALUE">
89 <xsl:value-of select="available"/>
91 <pz:metadata type="publicnote" empty="PAZPAR2_NULL_VALUE">
92 <xsl:value-of select="publicnote"/>
96 <xsl:template match="location">
97 <pz:metadata type="locallocation">
98 <xsl:value-of select="."/>
102 <xsl:template match="callno">
103 <pz:metadata type="callnumber">
104 <xsl:value-of select="."/>
108 <xsl:template match="*" >
109 <pz:metadata type="{local-name()}">
110 <xsl:value-of select="."/>
114 <xsl:template match="text()"/>