|
Line 0
Link Here
|
|
|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
| 2 |
<!DOCTYPE stylesheet [<!ENTITY nbsp " ">]> |
| 3 |
<xsl:stylesheet |
| 4 |
xmlns:marc="http://www.loc.gov/MARC21/slim" |
| 5 |
xmlns:srw_dc="info:srw/schema/1/dc-schema" |
| 6 |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 7 |
xmlns="http://purl.org/dc/elements/1.1/" |
| 8 |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
| 9 |
version="1.0" |
| 10 |
exclude-result-prefixes="marc"> |
| 11 |
<xsl:import href="UNIMARCslimUtils.xsl"/> |
| 12 |
<xsl:output method="xml" indent="yes" encoding="UTF-8"/> |
| 13 |
<xsl:template match="/"> |
| 14 |
<xsl:if test="marc:collection"> |
| 15 |
<srw_dc:dcCollection xmlns:srw_dc="info:srw/schema/1/dc-schema" xsi:schemaLocation="info:srw/schema/1/dc-schema http://www.loc.gov/z3950/agency/zing/srw/dc-schema.xsd"> |
| 16 |
<xsl:for-each select="marc:collection"> |
| 17 |
<xsl:for-each select="marc:record"> |
| 18 |
<srw_dc:dc> |
| 19 |
<xsl:apply-templates select="."/> |
| 20 |
</srw_dc:dc> |
| 21 |
</xsl:for-each> |
| 22 |
</xsl:for-each> |
| 23 |
</srw_dc:dcCollection> |
| 24 |
</xsl:if> |
| 25 |
<xsl:if test="marc:record"> |
| 26 |
<srw_dc:dc xmlns:srw_dc="info:srw/schema/1/dc-schema" xsi:schemaLocation="info:srw/schema/1/dc-schema http://www.loc.gov/z3950/agency/zing/srw/dc-schema.xsd"> |
| 27 |
<xsl:apply-templates select="marc:record"/> |
| 28 |
</srw_dc:dc> |
| 29 |
</xsl:if> |
| 30 |
</xsl:template> |
| 31 |
<xsl:template match="marc:record"> |
| 32 |
<xsl:for-each select="marc:datafield[@tag=200]"> |
| 33 |
<title> |
| 34 |
<xsl:variable name="title" select="marc:subfield[@code='a']"/> |
| 35 |
<xsl:variable name="ntitle" |
| 36 |
select="translate($title, '˜œ슜슛슘슈슉','')"/> |
| 37 |
<xsl:value-of select="$ntitle" /> |
| 38 |
<xsl:if test="marc:subfield[@code='e']"> |
| 39 |
<xsl:text> : </xsl:text> |
| 40 |
<xsl:for-each select="marc:subfield[@code='e']"> |
| 41 |
<xsl:value-of select="."/> |
| 42 |
</xsl:for-each> |
| 43 |
</xsl:if> |
| 44 |
<xsl:for-each select="marc:subfield[@code='h' or @code='i' or @code='v']"> |
| 45 |
<xsl:text>, </xsl:text> |
| 46 |
<xsl:value-of select="."/> |
| 47 |
</xsl:for-each> |
| 48 |
</title> |
| 49 |
</xsl:for-each> |
| 50 |
<xsl:for-each select="marc:datafield[@tag=700 or @tag=701 or @tag=702 or @tag=710 or @tag=711 or @tag=712]"> |
| 51 |
<creator> |
| 52 |
<xsl:for-each select="marc:subfield[@code='a' or @code='b' or @code='c' or @code='d']"> |
| 53 |
<xsl:value-of select="." /> |
| 54 |
<xsl:if test="not(position()=last())"> |
| 55 |
<xsl:text>, </xsl:text> |
| 56 |
</xsl:if> |
| 57 |
</xsl:for-each> |
| 58 |
<xsl:choose> |
| 59 |
<xsl:when test="marc:subfield[@code='4']='010'">, adapter</xsl:when> |
| 60 |
<xsl:when test="marc:subfield[@code='4']='020'">, annotator</xsl:when> |
| 61 |
<xsl:when test="marc:subfield[@code='4']='075'">, author of afterword</xsl:when> |
| 62 |
<xsl:when test="marc:subfield[@code='4']='080'">, prefacer</xsl:when> |
| 63 |
<xsl:when test="marc:subfield[@code='4']='100'">, bibliographic antecedent</xsl:when> |
| 64 |
<xsl:when test="marc:subfield[@code='4']='205'">, collaborator</xsl:when> |
| 65 |
<xsl:when test="marc:subfield[@code='4']='212'">, commentator</xsl:when> |
| 66 |
<xsl:when test="marc:subfield[@code='4']='220'">, compiler</xsl:when> |
| 67 |
<xsl:when test="marc:subfield[@code='4']='230'">, composer</xsl:when> |
| 68 |
<xsl:when test="marc:subfield[@code='4']='245'">, conceptor</xsl:when> |
| 69 |
<xsl:when test="marc:subfield[@code='4']='295'">, degree-grantor</xsl:when> |
| 70 |
<xsl:when test="marc:subfield[@code='4']='340'">, editor</xsl:when> |
| 71 |
<xsl:when test="marc:subfield[@code='4']='370'">, film editor</xsl:when> |
| 72 |
<xsl:when test="marc:subfield[@code='4']='395'">, founder</xsl:when> |
| 73 |
<xsl:when test="marc:subfield[@code='4']='440'">, illustrator</xsl:when> |
| 74 |
<xsl:when test="marc:subfield[@code='4']='520'">, lyricist</xsl:when> |
| 75 |
<xsl:when test="marc:subfield[@code='4']='557'">, organiser of meeting</xsl:when> |
| 76 |
<xsl:when test="marc:subfield[@code='4']='570'">, other</xsl:when> |
| 77 |
<xsl:when test="marc:subfield[@code='4']='600'">, photographer</xsl:when> |
| 78 |
<xsl:when test="marc:subfield[@code='4']='605'">, presenter</xsl:when> |
| 79 |
<xsl:when test="marc:subfield[@code='4']='650'">, publisher</xsl:when> |
| 80 |
<xsl:when test="marc:subfield[@code='4']='651'">, publishing director</xsl:when> |
| 81 |
<xsl:when test="marc:subfield[@code='4']='673'">, research team head</xsl:when> |
| 82 |
<xsl:when test="marc:subfield[@code='4']='675'">, reviewer</xsl:when> |
| 83 |
<xsl:when test="marc:subfield[@code='4']='710'">, redactor</xsl:when> |
| 84 |
<xsl:when test="marc:subfield[@code='4']='723'">, sponsor</xsl:when> |
| 85 |
<xsl:when test="marc:subfield[@code='4']='727'">, thesis advisor</xsl:when> |
| 86 |
<xsl:when test="marc:subfield[@code='4']='730'">, translator</xsl:when> |
| 87 |
</xsl:choose> |
| 88 |
</creator> |
| 89 |
</xsl:for-each> |
| 90 |
<type> |
| 91 |
<xsl:value-of select="marc:datafield[@tag=200]/marc:subfield[@code='b']"/> |
| 92 |
</type> |
| 93 |
<xsl:for-each select="marc:datafield[@tag=210]"> |
| 94 |
<publisher> |
| 95 |
<xsl:for-each select="marc:subfield[@code='c']"> |
| 96 |
<xsl:value-of select="."/> |
| 97 |
<xsl:if test="not(position()=last())">, </xsl:if> |
| 98 |
</xsl:for-each> |
| 99 |
<xsl:if test="marc:subfield[@code='a']"> |
| 100 |
<xsl:text> / </xsl:text> |
| 101 |
<xsl:for-each select="marc:subfield[@code='a']"> |
| 102 |
<xsl:value-of select="."/> |
| 103 |
<xsl:if test="not(position()=last())">, </xsl:if> |
| 104 |
</xsl:for-each> |
| 105 |
</xsl:if> |
| 106 |
</publisher> |
| 107 |
</xsl:for-each> |
| 108 |
<xsl:for-each select="marc:datafield[@tag=210]/marc:subfield[@code='d']"> |
| 109 |
<date> |
| 110 |
<xsl:value-of select="."/> |
| 111 |
</date> |
| 112 |
</xsl:for-each> |
| 113 |
<xsl:for-each select="marc:datafield[@tag=101]"> |
| 114 |
<xsl:for-each select="marc:subfield[@code='a']"> |
| 115 |
<language> |
| 116 |
<xsl:value-of select="."/> |
| 117 |
</language> |
| 118 |
</xsl:for-each> |
| 119 |
</xsl:for-each> |
| 120 |
<xsl:for-each select="marc:datafield[@tag=856]/marc:subfield[@code='q']"> |
| 121 |
<format> |
| 122 |
<xsl:value-of select="."/> |
| 123 |
</format> |
| 124 |
</xsl:for-each> |
| 125 |
<xsl:for-each select="marc:datafield[300<@tag][@tag<=337]"> |
| 126 |
<description> |
| 127 |
<xsl:value-of select="marc:subfield[@code='a']"/> |
| 128 |
</description> |
| 129 |
</xsl:for-each> |
| 130 |
<xsl:for-each select="marc:datafield[600<=@tag][@tag<=610]"> |
| 131 |
<subject> |
| 132 |
<xsl:call-template name="subfieldSelect"> |
| 133 |
<xsl:with-param name="codes">abcdq</xsl:with-param> |
| 134 |
</xsl:call-template> |
| 135 |
</subject> |
| 136 |
</xsl:for-each> |
| 137 |
<xsl:for-each select="marc:datafield[@tag=461 or @tag=464]"> |
| 138 |
<relation> |
| 139 |
<xsl:call-template name="subfieldSelect"> |
| 140 |
<xsl:with-param name="codes">t</xsl:with-param> |
| 141 |
</xsl:call-template> |
| 142 |
</relation> |
| 143 |
</xsl:for-each> |
| 144 |
<xsl:for-each select="marc:datafield[@tag=856]"> |
| 145 |
<identifier> |
| 146 |
<xsl:value-of select="marc:subfield[@code='u']"/> |
| 147 |
</identifier> |
| 148 |
</xsl:for-each> |
| 149 |
<xsl:for-each select="marc:datafield[@tag=010]"> |
| 150 |
<identifier> |
| 151 |
<xsl:text>URN:ISBN:</xsl:text> |
| 152 |
<xsl:value-of select="marc:subfield[@code='a']"/> |
| 153 |
</identifier> |
| 154 |
</xsl:for-each> |
| 155 |
<xsl:for-each select="marc:datafield[@tag=011]"> |
| 156 |
<identifier> |
| 157 |
<xsl:text>URN:ISSN:</xsl:text> |
| 158 |
<xsl:value-of select="marc:subfield[@code='a']"/> |
| 159 |
</identifier> |
| 160 |
</xsl:for-each> |
| 161 |
<xsl:for-each select="marc:datafield[@tag=995]"> |
| 162 |
<identifier> |
| 163 |
<xsl:text>LOC:</xsl:text> |
| 164 |
<xsl:choose> |
| 165 |
<xsl:when test="marc:subfield[@code='c']='MAIN'">Main library</xsl:when> |
| 166 |
<xsl:when test="marc:subfield[@code='c']='BIB2'">Library 2</xsl:when> |
| 167 |
</xsl:choose> |
| 168 |
<xsl:for-each select="marc:subfield[@code='k']"> |
| 169 |
<xsl:text>:</xsl:text> |
| 170 |
<xsl:value-of select="."/> |
| 171 |
</xsl:for-each> |
| 172 |
</identifier> |
| 173 |
</xsl:for-each> |
| 174 |
</xsl:template> |
| 175 |
</xsl:stylesheet> |