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>
62 <xsl:for-each select="author/name">
63 <pz:metadata type="author">
64 <xsl:value-of select="." />
68 <xsl:for-each select="article/title">
69 <pz:metadata type="title">
70 <xsl:value-of select="." />
74 <xsl:for-each select="journal/issn">
75 <pz:metadata type="issn">
76 <xsl:value-of select="." />
80 <xsl:for-each select="journal/title">
81 <pz:metadata type="journal-title">
82 <xsl:value-of select="." />
86 <xsl:for-each select="localInfo/systemno">
87 <pz:metadata type="system-control-nr">
88 <xsl:value-of select="."/>
92 <pz:metadata type="description">
93 <xsl:value-of select="$description" />
96 <xsl:for-each select="ctrlT/term">
97 <pz:metadata type="subject">
98 <xsl:value-of select="." />
102 <xsl:for-each select="tmarc:d773">
103 <pz:metadata type="citation">
104 <xsl:for-each select="*">
105 <xsl:value-of select="normalize-space(.)" />
106 <xsl:text> </xsl:text>
111 <pz:metadata type="medium">
112 <xsl:value-of select="$vmedium" />
115 <xsl:for-each select="article/fulltext">
116 <pz:metadata type="fulltext">
117 <xsl:value-of select="." />
121 <!-- passthrough id data -->
122 <xsl:for-each select="pz:metadata">
123 <xsl:copy-of select="." />
126 <!-- other stylesheets importing this might want to define this -->
127 <xsl:call-template name="record-hook" />
134 <xsl:template match="text()" />