1 <?xml version="1.0" encoding="UTF-8"?>
4 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
5 xmlns:pz="http://www.indexdata.com/pazpar2/1.0"
6 xmlns:marc="http://www.loc.gov/MARC21/slim">
8 <xsl:output indent="yes" method="xml" version="1.0" encoding="UTF-8"/>
11 <xsl:template match="/marc:record">
14 <xsl:for-each select="marc:controlfield[@tag='001']">
15 <pz:metadata type="id">
16 <xsl:value-of select="."/>
21 <xsl:for-each select="marc:datafield[@tag='020']">
22 <xsl:if test="marc:subfield[@code='a'] = 'US'">
23 <pz:metadata type="lccn">
24 <xsl:value-of select="marc:subfield[@code='b']"/>
29 <xsl:for-each select="marc:datafield[@tag='010']">
30 <pz:metadata type="isbn">
31 <xsl:value-of select="marc:subfield[@code='a']"/>
35 <xsl:for-each select="marc:datafield[@tag='011']">
36 <pz:metadata type="issn">
37 <xsl:value-of select="marc:subfield[@code='a']"/>
42 <xsl:for-each select="marc:datafield[@tag='200']">
43 <pz:metadata type="title">
44 <xsl:value-of select="marc:subfield[@code='a']"/>
49 <!-- Date of Pulbication -->
50 <xsl:for-each select="marc:datafield[@tag='210']">
51 <pz:metadata type="date">
52 <xsl:value-of select="marc:subfield[@code='d']"/>
56 <!-- Usmarc 650 maps to unimarc 606 and marc21 653 maps to unimarc 610 -->
57 <xsl:for-each select="marc:datafield[@tag='606' or @tag='610']">
58 <pz:metadata type="subject">
59 <xsl:value-of select="marc:subfield[@code='a']"/>
63 <xsl:for-each select="marc:datafield[@tag >= 300 and @tag <= 345]
65 <pz:metadata type="description">
66 <xsl:value-of select="*/text()"/>
71 <!-- Author : primary, alternative and secondary responsibility (equivalent marc21 tags : 100, 700 -->
72 <xsl:for-each select="marc:datafield[@tag='700' or @tag='701' or @tag='702']">
73 <pz:metadata type="author">
74 <xsl:value-of select="marc:subfield[@code='a']"/>
75 <xsl:text>, </xsl:text>
76 <xsl:value-of select="marc:subfield[@code='b']"/>
80 <!-- Author : marc21 tag 720 maps to unimarc 730
81 <xsl:for-each select="marc:datafield[@tag='730']">
82 <pz:metadata type="author">
83 <xsl:value-of select="marc:subfield[@code='a']"/>
89 <xsl:for-each select="marc:datafield[@tag='856']">
90 <pz:metadata type="url">
91 <xsl:value-of select="marc:subfield[@code='u']"/>