Newer
Older
<xsl:transform version="1.0"
xmlns:dct="http://purl.org/dc/terms/"
xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:marcrel="http://id.loc.gov/vocabulary/relators/"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdau="http://rdaregistry.info/Elements/u/"
xmlns:skos="http://www.w3.org/2004/02/skos/core#"
xmlns:mods="http://www.loc.gov/mods/v3"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:variable name="proxyBaseUrl">http://uri.hab.de/instance/proxy/opac-de-23/record/</xsl:variable>
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<xsl:template match="mods:mods">
<rdf:RDF>
<dct:BibliographicResource rdf:about="{$proxyBaseUrl}{mods:recordInfo/mods:recordIdentifier}">
<skos:prefLabel>
<!-- Verfasser -->
<xsl:if test="mods:name[mods:role/mods:roleTerm = 'aut'][mods:namePart[@type = 'family' or @type = 'given']]">
<xsl:for-each select="mods:name[mods:role/mods:roleTerm = 'aut'][mods:namePart[@type = 'family' or @type = 'given']]">
<xsl:if test="position() > 1">
<xsl:text>; </xsl:text>
</xsl:if>
<xsl:if test="mods:namePart[@type = 'family'] and mods:namePart[@type = 'given']">
<xsl:value-of select="mods:namePart[@type = 'family']"/>
<xsl:text>, </xsl:text>
</xsl:if>
<xsl:value-of select="mods:namePart[@type = 'given']"/>
</xsl:for-each>
<xsl:text>: </xsl:text>
</xsl:if>
<!-- Titel -->
<xsl:value-of select="mods:titleInfo[not(preceding-sibling::mods:titleInfo)]/mods:title"/>
<xsl:text>. - </xsl:text>
<!-- Ort und Verlage -->
<xsl:for-each select="mods:originInfo[mods:dateIssued]/mods:place">
<xsl:if test="position() > 1">
<xsl:text>; </xsl:text>
</xsl:if>
<xsl:value-of select="."/>
</xsl:for-each>
<xsl:if test="mods:originInfo[mods:dateIssued]/mods:place and mods:originInfo[mods:dateIssued]/mods:publisher">
<xsl:text> : </xsl:text>
</xsl:if>
<xsl:for-each select="mods:originInfo[mods:dateIssued]/mods:publisher">
<xsl:if test="position() > 1">
<xsl:text>; </xsl:text>
</xsl:if>
<xsl:value-of select="."/>
</xsl:for-each>
<!-- Datum -->
<xsl:if test="mods:originInfo[mods:dateIssued]/mods:place or mods:originInfo[mods:dateIssued]/mods:publisher">
<xsl:text>, </xsl:text>
</xsl:if>
<xsl:value-of select="mods:originInfo/mods:dateIssued"/>
<!-- Signatur -->
<xsl:if test="mods:location/mods:shelfLocator">
<xsl:text>. - HAB Wolfenbüttel </xsl:text>
<xsl:value-of select="mods:location/mods:shelfLocator[1]"/>
</xsl:if>
</skos:prefLabel>
<xsl:apply-templates/>
</dct:BibliographicResource>
</rdf:RDF>
</xsl:template>
<xsl:template match="mods:mods/mods:titleInfo[not(preceding-sibling::mods:titleInfo)]">
<dct:title>
<xsl:value-of select="normalize-space(concat(mods:nonSort, ' ', mods:title))"/>
<xsl:if test="mods:subTitle">
<xsl:value-of select="concat(' : ', mods:subTitle)"/>
</xsl:if>
</dct:title>
</xsl:template>
<xsl:template match="mods:language/mods:languageTerm[@type = 'code'][@authority = 'iso639-2b']">
<dct:language>
<skos:Concept>
<owl:sameAs rdf:resource="http://id.loc.gov/vocabulary/iso639-2/{.}"/>
<skos:prefLabel><xsl:value-of select="."/></skos:prefLabel>
</skos:Concept>
</dct:language>
</xsl:template>
<xsl:template match="mods:subject[@authority = 'gnd']/mods:topic">
<dct:subject>
<skos:Concept>
<xsl:choose>
<xsl:when test="starts-with(@valueURI, 'http://uri.hab.de')">
<xsl:attribute name="rdf:about"><xsl:value-of select="@valueURI"/></xsl:attribute>
</xsl:when>
<xsl:when test="@valueURI">
<owl:sameAs rdf:resource="{@valueURI}"/>
</xsl:when>
</xsl:choose>
<skos:prefLabel><xsl:value-of select="."/></skos:prefLabel>
</skos:Concept>
</dct:subject>
</xsl:template>
<xsl:template match="mods:classification">
<dct:subject>
<skos:Concept>
<xsl:choose>
<xsl:when test="starts-with(@valueURI, 'http://uri.hab.de')">
<xsl:attribute name="rdf:about"><xsl:value-of select="@valueURI"/></xsl:attribute>
</xsl:when>
<xsl:when test="@valueURI">
<owl:sameAs rdf:resource="{@valueURI}"/>
</xsl:when>
</xsl:choose>
<skos:prefLabel><xsl:value-of select="."/></skos:prefLabel>
</skos:Concept>
</dct:subject>
</xsl:template>
<xsl:template match="mods:originInfo[mods:dateIssued]">
<dct:issued><xsl:value-of select="mods:dateIssued"/></dct:issued>
<xsl:if test="mods:place/mods:placeTerm[@type = 'text']">
<rdau:P60163><xsl:value-of select="mods:place/mods:placeTerm[@type = 'text']"/></rdau:P60163>
</xsl:if>
<xsl:if test="mods:publisher">
<rdau:P60547><xsl:value-of select="mods:publisher"/></rdau:P60547>
</xsl:if>
</xsl:template>
<xsl:template match="mods:name[@type = 'personal'][mods:role/mods:roleTerm[@authority = 'marcrelator' and @type = 'code']]">
<xsl:element name="marcrel:{mods:role/mods:roleTerm[@authority = 'marcrelator' and @type = 'code']}">
<dct:Agent>
<xsl:if test="@valueURI">
<owl:sameAs rdf:resource="{@valueURI}"/>
</xsl:if>
<skos:prefLabel><xsl:value-of select="mods:displayForm"/></skos:prefLabel>
</dct:Agent>
</xsl:element>
</xsl:template>
<xsl:template match="text()"/>
</xsl:transform>