1 <?xml version="1.0" encoding="UTF-8"?>
2 <xsl:stylesheet version="1.0"
3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4 xmlns:pz="http://www.indexdata.com/pazpar2/1.0"
5 xmlns:zs="http://www.loc.gov/zing/srw/"
6 xmlns:tmarc="http://www.indexdata.com/turbomarc">
8 <xsl:output indent="yes" method="xml" version="1.0"
10 <xsl:param name="medium"/>
12 <!-- Extract metadata from MARC21/USMARC from streamlined marcxml format
13 http://www.loc.gov/marc/bibliographic/ecbdhome.html -->
14 <xsl:template name="record-hook" />
17 <xsl:template match="/">
18 <xsl:apply-templates />
21 <xsl:template match="zs:searchRetrieveResponse">
22 <xsl:apply-templates />
25 <xsl:template match="zs:records">
27 <xsl:apply-templates />
31 <xsl:template match="zs:record">
32 <xsl:apply-templates />
35 <xsl:template match="zs:recordData">
36 <xsl:apply-templates />
39 <xsl:template match="doc">
41 <xsl:apply-templates />
45 <xsl:template match="art">
46 <xsl:variable name="journal_title" select="journal/title" />
47 <xsl:variable name="journal_issn" select="journal/issn" />
48 <xsl:variable name="date" select="localInfo/cdate" />
49 <xsl:variable name="description" select="abstract/abstract" />
51 <xsl:variable name="vmedium">
53 <xsl:when test="$journal_title">article</xsl:when>
55 <xsl:text>other</xsl:text>
61 <xsl:for-each select="author/name">
62 <pz:metadata type="author">
63 <xsl:value-of select="." />
67 <xsl:for-each select="article/title">
68 <pz:metadata type="title">
69 <xsl:value-of select="." />
73 <xsl:for-each select="journal/issn">
74 <pz:metadata type="issn">
75 <xsl:value-of select="." />
79 <xsl:for-each select="journal/title">
80 <pz:metadata type="journal-title">
81 <xsl:value-of select="." />
85 <xsl:for-each select="journal">
86 <pz:metadata type="journal-subpart">
87 <xsl:text>Vol. </xsl:text><xsl:value-of select="vol" />
88 <xsl:text> no. </xsl:text><xsl:value-of select="issue" />
89 <xsl:text>(</xsl:text><xsl:value-of select="month" /><xsl:text>-</xsl:text><xsl:value-of select="year" /><xsl:text>)</xsl:text>
90 <xsl:text> p. </xsl:text><xsl:value-of select="page" />
94 <xsl:for-each select="localInfo/systemno">
95 <pz:metadata type="system-control-nr">
96 <xsl:value-of select="."/>
100 <pz:metadata type="description">
101 <xsl:value-of select="$description" />
104 <xsl:for-each select="ctrlT/term">
105 <pz:metadata type="subject">
106 <xsl:value-of select="." />
110 <xsl:for-each select="tmarc:d773">
111 <pz:metadata type="citation">
112 <xsl:for-each select="*">
113 <xsl:value-of select="normalize-space(.)" />
114 <xsl:text> </xsl:text>
119 <pz:metadata type="medium">
120 <xsl:value-of select="$vmedium" />
123 <xsl:for-each select="article/fulltext">
124 <pz:metadata type="fulltext">
125 <xsl:value-of select="." />
129 <!-- passthrough id data -->
130 <xsl:for-each select="pz:metadata">
131 <xsl:copy-of select="." />
134 <!-- other stylesheets importing this might want to define this -->
135 <xsl:call-template name="record-hook" />
142 <xsl:template match="text()" />