blob: 3f0cc685574d9753bc3923f34289e439d74f0c14 [file] [log] [blame]
Marc Kupietz7cc8fc72024-05-26 16:49:38 +02001<?xml version="1.0" encoding="UTF-8"?>
Marc Kupietz1a422662024-03-16 09:34:10 +01002<xsl:stylesheet version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3 xmlns:xs="http://www.w3.org/2001/XMLSchema"
4 xmlns:opf="http://www.idpf.org/2007/opf"
5 xmlns:dc="http://purl.org/dc/elements/1.1/"
6 xmlns:ids="http://www.ids-mannheim.de/ids"
7 xmlns:hlu="http://www.ids-mannheim.de/hlu"
8 xmlns:saxon="http://saxon.sf.net/"
9 xmlns:xhtml="http://www.w3.org/1999/xhtml"
Marc Kupietz10903f32024-04-14 14:21:18 +020010 xmlns:map="http://www.w3.org/2005/xpath-functions/map"
Rebecca Wilme5f055a2024-05-10 15:07:50 +020011 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
12 xmlns:srw="http://www.loc.gov/zing/srw/"
13 xmlns:oai="http://www.openarchives.org/OAI/2.0/oai_dc/"
14 exclude-result-prefixes="xs opf dc ids hlu map saxon xhtml xsi srw oai">
Marc Kupietz1a422662024-03-16 09:34:10 +010015
16 <xsl:output method="xml" indent="yes" omit-xml-declaration="yes" saxon:line-length="1000"/>
17 <xsl:strip-space elements="*"/>
18
Marc Kupietz7f3fe792024-07-26 15:28:26 +020019 <xsl:param name="debug"/>
20
Marc Kupietz1a422662024-03-16 09:34:10 +010021 <xsl:variable name="ev"/>
22 <xsl:variable name="x"/>
Rebecca Wilm2f345ff2024-07-30 16:58:25 +020023
Marc Kupietz0df2a572024-05-26 16:54:27 +020024 <xsl:variable name="idno" as="xs:string" select="replace(base-uri(), '.*/([0-9]{9,13}X?).*' , '$1')"/>
Marc Kupietz1a422662024-03-16 09:34:10 +010025
Rebecca Wilmf614a4b2024-05-07 10:19:43 +020026 <xsl:variable name="idno_type">
Rebecca Wilme5f055a2024-05-10 15:07:50 +020027 <xsl:choose>
28 <xsl:when test="starts-with($idno,'1')">
29 <xsl:value-of select="'IDN'"/>
30 </xsl:when>
31 <xsl:otherwise>
32 <xsl:value-of select="'ISBN'"/>
33 </xsl:otherwise>
34 </xsl:choose>
Rebecca Wilmf614a4b2024-05-07 10:19:43 +020035 </xsl:variable>
Rebecca Wilm2f345ff2024-07-30 16:58:25 +020036
Marc Kupietz1c3ebca2024-09-22 13:49:28 +020037 <xsl:param name="buchpreis"/>
Rebecca Wilmf614a4b2024-05-07 10:19:43 +020038
Marc Kupietz0df2a572024-05-26 16:54:27 +020039 <xsl:variable name="dnbBookdataQuery" as="xs:string">
40 <xsl:value-of disable-output-escaping="yes" select="concat('https://services.dnb.de/sru/dnb?version=1.1&amp;operation=searchRetrieve&amp;query=', $idno_type, '%3D', $idno, '&amp;recordSchema=oai_dc')"/>
41 </xsl:variable>
Marc Kupietz1a422662024-03-16 09:34:10 +010042 <xsl:variable name="dnbBookdata">
Marc Kupietz2c7bc7e2024-09-30 14:09:25 +020043 <xsl:if test="$debug">
44 <xsl:message select="concat('debug message dnbBookdataQuery: ', $dnbBookdataQuery)"/>
45 <xsl:message select="concat('debug message idno: ', $idno)"/>
46 <xsl:message select="concat('debug message original title from static metadata: ', if(starts-with($idno, '8')) then doc('static_metadata.xml')//oai:dc[dc:identifier=$idno]//dc:title else '')"/>
47 </xsl:if>
Marc Kupietzf475f222024-09-30 15:01:06 +020048 <xsl:variable name="tmp" select="if(starts-with($idno, '8')) then doc('static_metadata.xml')//oai:dc[dc:identifier=$idno] else doc($dnbBookdataQuery)"/>
49 <xsl:copy-of select="if($tmp//dc:title) then $tmp else doc('static_metadata.xml')//oai:dc[replace(dc:identifier[@xsi:type='tel:ISBN'][1], '-', '')=$idno]"/>
Marc Kupietz1a422662024-03-16 09:34:10 +010050 </xsl:variable>
51
52 <xsl:variable name="autor"
Marc Kupietzde2ca532024-04-26 16:50:53 +020053 select="replace(string-join($dnbBookdata//dc:creator[not(contains(., '[')) or matches(., '\[Verfasser\]')], ' ; '), ' *\[[^\]]*\]', '')"/>
Marc Kupietzeaa90132024-04-26 18:14:40 +020054 <xsl:variable name="straight_autor" select="normalize-space(replace(hlu:reversedAuthors($autor), ',', ''))"/>
55 <xsl:variable name="translator"
56 select="replace(string-join($dnbBookdata//dc:creator[matches(., '\[Übersetzer\]')], ' ; '), ' *\[[^\]]*\]', '')"/>
57 <xsl:variable name="straight_translator" select="normalize-space(replace(hlu:reversedAuthors($translator), ',', ''))"/>
Marc Kupietz1a422662024-03-16 09:34:10 +010058
Marc Kupietz15e7d612024-04-26 18:16:39 +020059 <xsl:variable name="herausgeber"
60 select="replace(string-join($dnbBookdata//dc:creator[matches(., '\[(Herausgeber|Hrsg.)\]')], ' ; '), ' *\[[^\]]*\]', '')"/>
61 <xsl:variable name="straight_herausgeber" select="normalize-space(replace(hlu:reversedAuthors($herausgeber), ',', ''))"/>
Marc Kupietz1a422662024-03-16 09:34:10 +010062
63 <xsl:variable name="ina"/>
64 <xsl:variable name="_corpus"/>
65 <xsl:variable name="ent_known"/>
66
67
68 <!-- added HLU 2012-02-09: -->
69 <xsl:variable name="ent">
70 <xsl:choose>
71 <xsl:when test="$ent_known">
72 <xsl:value-of select="$ent_known"/>
73 </xsl:when>
74 <xsl:when test="$ev">
75 <xsl:value-of select="$ev"/>
76 </xsl:when>
77 <xsl:otherwise>
78 <xsl:value-of select="$j"/>
79 </xsl:otherwise>
80 </xsl:choose>
81 </xsl:variable>
82
83 <xsl:variable name="titel">
Marc Kupietz49124fa2024-04-10 16:50:01 +020084 <xsl:variable name="title-with-subtitles">
Marc Kupietz2c7bc7e2024-09-30 14:09:25 +020085 <xsl:if test="$debug">
86 <xsl:message select="concat('title: ', ($dnbBookdata//dc:title)[1])"/>
87 </xsl:if>
Marc Kupietz49124fa2024-04-10 16:50:01 +020088 <xsl:choose>
Marc Kupietz6cb52232024-04-13 12:28:44 +020089 <xsl:when test="contains(($dnbBookdata//dc:title)[1],':')">
Marc Kupietz744d30e2024-09-22 12:49:45 +020090 <xsl:choose>
91 <xsl:when test="matches(($dnbBookdata//dc:title)[1], '.*/.*:.*/')">
92 <xsl:value-of select="normalize-space(substring-before(($dnbBookdata//dc:title)[1], ':'))"/>
93 </xsl:when>
94 <xsl:otherwise>
95 <xsl:value-of select="normalize-space(substring-before(substring-before(($dnbBookdata//dc:title)[1], '/'), ':'))"/>
96 </xsl:otherwise>
97 </xsl:choose>
Marc Kupietz49124fa2024-04-10 16:50:01 +020098 </xsl:when>
Marc Kupietzb9903542024-09-30 14:02:18 +020099 <xsl:when test="contains(($dnbBookdata//dc:title)[1],'/')">
Marc Kupietz6cb52232024-04-13 12:28:44 +0200100 <xsl:value-of select="normalize-space(substring-before(($dnbBookdata//dc:title)[1], '/'))"/>
Marc Kupietzb9903542024-09-30 14:02:18 +0200101 </xsl:when>
102 <xsl:otherwise>
103 <xsl:value-of select="normalize-space(($dnbBookdata//dc:title)[1])"/>
Marc Kupietz49124fa2024-04-10 16:50:01 +0200104 </xsl:otherwise>
105 </xsl:choose>
106 </xsl:variable>
107 <xsl:value-of select="normalize-space(replace($title-with-subtitles, '\|.*', ''))"/>
Marc Kupietz1a422662024-03-16 09:34:10 +0100108 </xsl:variable>
109
110 <xsl:variable name="erscheinungsort">
111 <xsl:choose>
Marc Kupietz6cb52232024-04-13 12:28:44 +0200112 <xsl:when test="contains(($dnbBookdata//dc:publisher)[1], ':')">
113 <xsl:value-of select="normalize-space(substring-before(($dnbBookdata//dc:publisher)[1], ':'))"/>
Marc Kupietz1a422662024-03-16 09:34:10 +0100114 </xsl:when>
115 <xsl:otherwise>
Marc Kupietz6cb52232024-04-13 12:28:44 +0200116 <xsl:value-of select="normalize-space(($dnbBookdata//dc:publisher)[1])"/>
Marc Kupietz1a422662024-03-16 09:34:10 +0100117 </xsl:otherwise>
118 </xsl:choose>
119 </xsl:variable>
120
Marc Kupietzd8599fc2024-04-14 13:16:56 +0200121 <xsl:variable name="erscheinungsland" select="ids:country-city($erscheinungsort)"/>
122
Marc Kupietz6cb52232024-04-13 12:28:44 +0200123 <xsl:variable name="texttype" select="replace(($dnbBookdata//dc:subject[matches(., '^[A-Z] ')])[1], '^[A-Z] (.*)', '$1')"/>
Marc Kupietz7df4ccc2024-03-16 15:27:45 +0100124
Marc Kupietz9d87e9d2024-05-05 15:56:50 +0200125 <xsl:variable name="genretable">
126 <genres>
Nicolas Arnold32118802024-05-31 17:10:05 +0200127 <genre keyRegex="(krimi|thriller)" genre="Roman: Kriminalroman"/>
128 <genre keyRegex="arzt.?roman" genre="Roman: Arztroman"/>
129 <genre keyRegex="(liebes.*roman|dunja|romanze)" genre="Roman: Liebesroman"/>
Marc Kupietz9d87e9d2024-05-05 15:56:50 +0200130 <genre keyRegex="science.?fiction" genre="Roman: Science-Fiction-Roman"/>
131 <genre keyRegex="horror" genre="Roman: Horrorroman"/>
Marc Kupietzc214b4c2024-05-26 19:12:03 +0200132 <genre keyRegex="grusel" genre="Roman: Gruselroman"/>
133 <genre keyRegex="vampir.*roman" genre="Roman: Vampirroman"/>
Marc Kupietz9d87e9d2024-05-05 15:56:50 +0200134 <genre keyRegex="western" genre="Roman: Westernroman"/>
135 <genre keyRegex="fantasy" genre="Roman: Fantasyroman"/>
Marc Kupietzc214b4c2024-05-26 19:12:03 +0200136 <genre keyRegex="mystery" genre="Roman: Mysteryroman"/>
137 <genre keyRegex="heimat.*roman" genre="Roman: Heimatroman"/>
138 <genre keyRegex="familien.*roman" genre="Roman: Familienroman"/>
139 <genre keyRegex="(sex|erotik|erotische|versaute|fick|sm).*roman" genre="Roman: Erotikroman"/>
140 <genre keyRegex="gay" genre="Roman: Gay-Roman"/>
141 <genre keyRegex="(sex|erotik|erotische|versaute|fick|sm)" genre="Erzählung: Erotikerzählung"/>
Marc Kupietz9d87e9d2024-05-05 15:56:50 +0200142 <genre keyRegex="historischer roman" genre="Roman: Historischer Roman"/>
Nicolas Arnold32118802024-05-31 17:10:05 +0200143 <genre keyRegex="jugend" genre="Jugendliteratur: Jugendliteratur"/> <!-- wie in KJL -->
144 <genre keyRegex="(ein roman|der roman)" genre="Roman"/>
Marc Kupietz9d87e9d2024-05-05 15:56:50 +0200145 <genre keyRegex="erzählung" genre="Erzählung"/>
146 <genre keyRegex="novelle" genre="Novelle"/>
147 <genre keyRegex="anthologie" genre="Anthologie"/>
148 <genre keyRegex="kurzgeschichte" genre="Kurzgeschichte"/>
Marc Kupietzc214b4c2024-05-26 19:12:03 +0200149 <genre keyRegex="geschichte" genre="Erzählung"/>
150 <genre keyRegex="heftroman" genre="Roman: Heftroman"/>
Marc Kupietz9d87e9d2024-05-05 15:56:50 +0200151 <genre keyRegex="roman" genre="Roman"/>
152 <genre keyRegex="." genre="Roman"/>
153 </genres>
154 </xsl:variable>
155
156 <xsl:variable name="textFullGenre" select="$genretable/genres/genre[matches($dnbBookdata, ./@keyRegex, 'i')][1]/@genre"/>
Marc Kupietz1a422662024-03-16 09:34:10 +0100157 <xsl:variable name="verlag">
158 <xsl:choose>
Marc Kupietz6cb52232024-04-13 12:28:44 +0200159 <xsl:when test="contains(($dnbBookdata//dc:publisher)[1], ':')">
160 <xsl:value-of select="normalize-space(substring-after(($dnbBookdata//dc:publisher)[1], ':'))"/>
Marc Kupietz1a422662024-03-16 09:34:10 +0100161 </xsl:when>
162 <xsl:otherwise>
Marc Kupietz6cb52232024-04-13 12:28:44 +0200163 <xsl:value-of select="normalize-space(($dnbBookdata//dc:publisher)[1])"/>
Marc Kupietz1a422662024-03-16 09:34:10 +0100164 </xsl:otherwise>
165 </xsl:choose>
166 </xsl:variable>
167
168 <xsl:variable name="erscheinungsjahr">
Marc Kupietza5d01182024-04-14 12:24:02 +0200169 <xsl:value-of select="replace(($dnbBookdata//dc:date)[1], '.*?((19|20)[0-9][0-9]).*', '$1')"/>
Marc Kupietz1a422662024-03-16 09:34:10 +0100170 </xsl:variable>
171
172 <xsl:variable name="untertitel"
Marc Kupietz6cb52232024-04-13 12:28:44 +0200173 select="normalize-space(substring-after(substring-before(($dnbBookdata//dc:title)[1], '/'), ':'))"/>
Marc Kupietz1a422662024-03-16 09:34:10 +0100174
Marc Kupietza5d01182024-04-14 12:24:02 +0200175 <xsl:variable name="j" select="$erscheinungsjahr"/>
Marc Kupietz1a422662024-03-16 09:34:10 +0100176
177 <!-- for BOT+s: -->
178 <xsl:variable name="seiten" select="replace($dnbBookdata//dc:format,'S\.','')"/>
179
180 <!-- fuer BOT+b: -->
181 <xsl:variable name="_b">
182 <xsl:variable name="regexp1" select="'(Band|Bd\.)\s*([0-9]?[0-9]?[0-9])'"/>
183 <xsl:choose>
184 <xsl:when test="matches($dnbBookdata, $regexp1)">
185 <xsl:analyze-string select="$dnbBookdata//dc:title" regex="{$regexp1}">
186 <xsl:matching-substring>
187 <xsl:value-of select="."/>
188 </xsl:matching-substring>
189 </xsl:analyze-string>
190 </xsl:when>
191 <xsl:otherwise>
192 <xsl:value-of select="'.'"/>
193 </xsl:otherwise>
194 </xsl:choose>
195 </xsl:variable>
196
197 <!-- for BOT+x: -->
198 <xsl:variable name="txtart">
199 <xsl:choose>
200 <xsl:when test="$x">
201 <xsl:value-of select="concat('[', $x, ']')"/>
202 </xsl:when>
203 <xsl:when
Nicolas Arnold26355632024-05-10 15:25:41 +0200204 test="matches($untertitel, '([Rr]oman|[Ee]rzählung(en)?|[Aa]nthologie|[Gg]eschichte(n)?|[Nn]ovelle)')">
Marc Kupietz1a422662024-03-16 09:34:10 +0100205 <xsl:value-of
Nicolas Arnold26355632024-05-10 15:25:41 +0200206 select="concat('[', replace(replace($untertitel, '.*?(((^|\P{L})\p{L}+)?([Rr]oman|[Ee]rzählung(en)?|[Aa]nthologie|[Gg]eschichte(n)?|[Nn]ovelle)).*', '$1'), '\P{L}*(.+)', '$1'), ']')"
Marc Kupietz1a422662024-03-16 09:34:10 +0100207 />
208 </xsl:when>
209 <xsl:otherwise>
210 <xsl:value-of>Roman</xsl:value-of>
211 </xsl:otherwise>
212 </xsl:choose>
213 </xsl:variable>
214
215
216
217 <!-- fuer BOTd: -->
218 <xsl:variable name="dok"
219 select="concat((if(string-length($autor) &gt; 0) then concat($straight_autor, ': ') else ''), $titel, ', ', $txtart, ', (', $j, ')')"/>
220
221 <!-- END variables derived from sru request to dnb archive -->
222
223
Marc Kupietz94bbe6b2024-04-10 20:35:48 +0200224 <xsl:variable name="corpus_sigle" select="concat('DNB', substring($erscheinungsjahr, 3, 2))"/>
Marc Kupietz1a422662024-03-16 09:34:10 +0100225
226 <!-- for BOTD: -->
227 <!-- Dokumentsigle muss zusammen mit Korpussigle (z.B DIV fuer loz-div und loz-div-pub) eindeutig sein -->
228 <xsl:variable name="doc_sigle">
229 <xsl:variable name="firstContentWordTitleInitial">
230 <xsl:variable name="helper">
231 <xsl:analyze-string select="$titel" regex="\w+">
232 <xsl:matching-substring>
233 <xsl:choose>
234 <xsl:when
Marc Kupietzad1f3b82024-04-19 19:21:49 +0200235 test="matches(.,'^[A-Z]') and not(matches(.,'^(Der|Die|Das|Des|Ein|Eine|Eines|Einmal|Von|Mit|Zu|Zur)$'))">
Marc Kupietz1a422662024-03-16 09:34:10 +0100236 <!-- TODO: Fktnswoerter nachtragen -->
237 <xsl:sequence select="."/>
238 </xsl:when>
239 <xsl:otherwise/>
240 </xsl:choose>
241 </xsl:matching-substring>
242 </xsl:analyze-string>
243 </xsl:variable>
244 <xsl:value-of
Marc Kupietz77b6aa92024-04-21 17:31:43 +0200245 select="upper-case(substring(normalize-space(replace($helper,'\s+.+$','')),1,3))"/>
Marc Kupietz1a422662024-03-16 09:34:10 +0100246 <!-- longest match of .+ -->
247 </xsl:variable>
Marc Kupietz77b6aa92024-04-21 17:31:43 +0200248 <xsl:variable name="authorInitials">
249 <xsl:choose>
250 <xsl:when test="contains($autor,';')">
251 <xsl:variable name="lastname_aut1"
252 select="upper-case(substring(normalize-space($autor),1,1))"/>
253 <xsl:variable name="lastname_aut2"
254 select="replace($autor, '.*?;.*?([A-Z]).*', '$1')"/>
255 <xsl:value-of select="concat($lastname_aut1, $lastname_aut2)"/>
256 </xsl:when>
257 <xsl:otherwise>
258 <xsl:variable name="lastname_aut1"
259 select="upper-case(substring(normalize-space(substring-before($autor,',')),1,1))"/>
260 <xsl:variable name="firstname_aut1"
261 select="upper-case(substring(normalize-space(substring-after($autor,',')),1,1))"/>
262 <xsl:value-of select="concat($lastname_aut1, $firstname_aut1)"/>
263 </xsl:otherwise>
264 </xsl:choose>
265 </xsl:variable>
Marc Kupietz398b5962024-04-21 17:51:34 +0200266 <xsl:value-of select="substring(replace(normalize-unicode(concat($authorInitials,$firstContentWordTitleInitial), 'NFKD'),'[^A-Z]',''),1,3)"/>
Marc Kupietz1a422662024-03-16 09:34:10 +0100267 </xsl:variable>
268
269
Marc Kupietz0c246632024-04-29 07:08:23 +0200270 <xsl:variable name="text_sigle" select="replace($idno, '.*([0-9]{5})[0-9X]$', '$1')"/>
Marc Kupietz1a422662024-03-16 09:34:10 +0100271 <xsl:variable name="sigle" select="concat($corpus_sigle, '/', $doc_sigle, '.', $text_sigle)"/>
272
273 <!-- fuer BOT+xy: (?) -->
274 <xsl:variable name="xyref">
Marc Kupietz0df2a572024-05-26 16:54:27 +0200275 <xsl:value-of select="base-uri(.)"/>
Marc Kupietz1a422662024-03-16 09:34:10 +0100276 <xsl:text>; </xsl:text>
Marc Kupietz0c246632024-04-29 07:08:23 +0200277 <xsl:text>IDNO:</xsl:text>
278 <xsl:value-of select="$idno"/>
Marc Kupietz1a422662024-03-16 09:34:10 +0100279 <xsl:text>; </xsl:text>
280 <xsl:value-of select="string-join($dnbBookdata//dc:identifier)"/>
281 </xsl:variable>
282
Marc Kupietzb660ed62024-03-16 11:45:53 +0100283 <xsl:variable name="long-reference"
284 select="concat($sigle, ' ', $autor, ': ', $titel, '. ', $erscheinungsort, ': ', $verlag, ', ', $erscheinungsjahr)"/>
285
Nicolas Arnoldf84fcec2025-01-15 11:57:55 +0100286 <!-- NA -->
287 <xsl:variable name="bot_title"
288 select="concat($sigle, ' ', $autor, ': ', $titel, '. ', $erscheinungsort, ': ', $verlag, ', ', $erscheinungsjahr)"/>
289 <!-- end NA -->
290
Marc Kupietzb660ed62024-03-16 11:45:53 +0100291 <xsl:variable name="short-reference"
292 select="concat($straight_autor, ': ', $titel, ' (', $erscheinungsjahr, ')')"/>
Marc Kupietz1a422662024-03-16 09:34:10 +0100293
Nicolas Arnoldf84fcec2025-01-15 11:57:55 +0100294
Marc Kupietz1a422662024-03-16 09:34:10 +0100295 <xsl:template match="/">
Marc Kupietz98645242024-05-26 16:52:47 +0200296 <!-- for debugging purposes
297 <xsl:message select="concat('uri: ', base-uri())"/>
298 <xsl:message select="concat('idno: ', $idno)"/>
299
300 <xsl:message>
301 dnbBookdataQuery: <xsl:value-of select="$dnbBookdataQuery"/>
302 </xsl:message>
303
304 <xsl:message>
305 <xsl:copy-of select="$dnbBookdata"/>
306 </xsl:message>
307 -->
Harald Luengenb81b63b2025-01-09 15:44:14 +0100308
309
Marc Kupietz2c7bc7e2024-09-30 14:09:25 +0200310 <xsl:if test="not($dnbBookdata//oai:dc)">
311 <xsl:message terminate="yes" default-mode="text">ERROR: No metadata found for IDNO: <xsl:value-of select="$idno"/>
312 <xsl:text>&#10;Query was: </xsl:text>
313 <xsl:value-of disable-output-escaping="yes" select="replace($dnbBookdataQuery, '&amp;', '%38')"/>
314 <xsl:text>&#10;Retrieved response: </xsl:text>
315 <xsl:copy-of select="$dnbBookdata"/>
316 </xsl:message>
317 </xsl:if>
318
Marc Kupietzb7a4f6c2024-04-19 11:35:25 +0200319 <xsl:if test="not($j)">
Marc Kupietz0c246632024-04-29 07:08:23 +0200320 <xsl:message terminate="yes">ERROR: No dc:date found for IDNO: <xsl:value-of select="$idno"/></xsl:message>
Marc Kupietzb7a4f6c2024-04-19 11:35:25 +0200321 </xsl:if>
322
Marc Kupietz815cc6c2024-04-19 12:44:44 +0200323 <xsl:if test="not(normalize-space($titel))">
Marc Kupietz0c246632024-04-29 07:08:23 +0200324 <xsl:message terminate="yes">ERROR: No title found for IDNO: <xsl:value-of select="$idno"/></xsl:message>
Marc Kupietz815cc6c2024-04-19 12:44:44 +0200325 </xsl:if>
326
Marc Kupietz2badfb12024-04-19 12:59:40 +0200327 <xsl:if test="not(normalize-space($autor))">
Marc Kupietz0c246632024-04-29 07:08:23 +0200328 <xsl:message terminate="yes">ERROR: No author found for IDNO: <xsl:value-of select="$idno"/></xsl:message>
Marc Kupietz2badfb12024-04-19 12:59:40 +0200329 </xsl:if>
330
Nicolas Arnold1fbd37f2024-06-28 15:10:47 +0200331 <xsl:if test="not(matches($sigle, '^[A-Z]{2,3}[0-9]{2}/[A-Z]{2,3}\.[0-9]{5}$'))">
Marc Kupietz0c246632024-04-29 07:08:23 +0200332 <xsl:message terminate="yes">ERROR: Invalid sigle »<xsl:value-of select="$sigle"/>« for IDNO: <xsl:value-of select="$idno"/></xsl:message>
Marc Kupietz09745e12024-04-21 12:54:10 +0200333 </xsl:if>
334
Marc Kupietz1a422662024-03-16 09:34:10 +0100335 <idsDoc TEIform="TEI.2" type="text" version="1.0">
336 <idsHeader TEIform="teiHeader" pattern="text" status="new" type="document" version="1.1">
337 <fileDesc>
338 <titleStmt>
Marc Kupietzb660ed62024-03-16 11:45:53 +0100339 <dokumentSigle><xsl:value-of select="string-join(($corpus_sigle, $doc_sigle), '/')"/></dokumentSigle>
340 <d.title><xsl:value-of select="$short-reference"/></d.title>
Marc Kupietz1a422662024-03-16 09:34:10 +0100341 </titleStmt>
342 <publicationStmt>
343 <distributor/>
344 <pubAddress/>
345 <availability region="world" status="unknown">QAO-NC</availability>
346 <pubDate/>
347 </publicationStmt>
348 <sourceDesc>
349 <biblStruct>
350 <monogr>
351 <h.title type="main"/>
352 <imprint/>
353 </monogr>
354 </biblStruct>
355 </sourceDesc>
356 </fileDesc>
357 </idsHeader>
358 <idsText version="1.0">
359 <idsHeader TEIform="teiHeader" pattern="text" status="new" type="text" version="1.1">
360 <fileDesc>
361 <titleStmt>
362 <textSigle><xsl:sequence select="$sigle"/></textSigle>
Nicolas Arnoldf84fcec2025-01-15 11:57:55 +0100363 <!-- NA -->
364 <t.title assemblage="regular"><xsl:value-of select="$bot_title"/></t.title>
365 <!-- end NA -->
Marc Kupietz1a422662024-03-16 09:34:10 +0100366 </titleStmt>
367 <publicationStmt>
368 <distributor/>
369 <pubAddress/>
Rebecca Wilm7bb2b6f2024-06-17 10:34:47 +0200370 <xsl:for-each select="$dnbBookdata//dc:identifier">
371 <xsl:variable name="type" select="substring-after(@xsi:type, ':')"/>
372 <xsl:choose>
373 <xsl:when test="@xsi:type='tel:ISBN'">
374 <xsl:if test="matches(.,'(^([0-9]|-)+X?).*')">
375 <idno type="{$type}"><xsl:value-of select="replace(., '(([0-9]|-)+X?).*', '$1')"/></idno>
376 </xsl:if>
377 </xsl:when>
Marc Kupietz7582d572024-07-25 16:55:20 +0200378 <xsl:when test="$type='URL' and contains(., '/urn:nbn:de')">
379 <idno rend="URN;{tokenize(., '/')[last()]}" type="URL"><xsl:value-of select="."/></idno>
Marc Kupietzc4ea4092024-07-25 11:00:00 +0200380 </xsl:when>
Rebecca Wilm7bb2b6f2024-06-17 10:34:47 +0200381 <xsl:otherwise><idno type="{$type}"><xsl:value-of select="."/></idno></xsl:otherwise>
382 </xsl:choose>
383 </xsl:for-each>
Marc Kupietz1a422662024-03-16 09:34:10 +0100384 <availability region="world" status="unknown">QAO-NC</availability>
385 <pubDate/>
386 </publicationStmt>
387 <sourceDesc>
388 <biblStruct>
389 <monogr>
390 <h.title type="main"><xsl:value-of select="$titel"/></h.title>
391 <h.title type="sub"><xsl:value-of select="$untertitel"/></h.title>
392 <h.author><xsl:value-of select="$autor"/></h.author>
Marc Kupietzeaa90132024-04-26 18:14:40 +0200393 <xsl:if test="$translator">
394 <editor role="translator"><xsl:value-of select="$translator"/></editor>
395 </xsl:if>
Marc Kupietz15e7d612024-04-26 18:16:39 +0200396 <xsl:if test="$herausgeber">
397 <editor role="editor"><xsl:value-of select="$herausgeber"/></editor>
398 </xsl:if>
Marc Kupietz1a422662024-03-16 09:34:10 +0100399 <edition>
400 <further/>
401 <kind>E-Book-Ausgabe</kind>
402 <appearance>EPUB-Datei</appearance>
403 </edition>
404 <imprint>
Marc Kupietzb660ed62024-03-16 11:45:53 +0100405 <publisher><xsl:value-of select="$verlag"/></publisher>
Marc Kupietz1a422662024-03-16 09:34:10 +0100406 <pubDate type="year"><xsl:value-of select="$j"/></pubDate>
407 <pubDate type="month"/>
408 <pubDate type="day"/>
Marc Kupietzd8599fc2024-04-14 13:16:56 +0200409 <pubPlace key="{$erscheinungsland}"><xsl:value-of select="$erscheinungsort"/></pubPlace>
Marc Kupietz1a422662024-03-16 09:34:10 +0100410 </imprint>
411 <biblScope type="subsume"/>
412 <biblScope type="pp"/>
413 <biblScope type="vol"/>
414 <biblScope type="volume-title"/>
415 </monogr>
Marc Kupietz1c3ebca2024-09-22 13:49:28 +0200416 <xsl:if test="$buchpreis">
Rebecca Wilm2f345ff2024-07-30 16:58:25 +0200417 <xsl:element name="note">
418 <xsl:attribute name="type">award</xsl:attribute>
419 <xsl:attribute name="subtype">
Marc Kupietze43c7202024-09-22 12:53:41 +0200420 <xsl:value-of select="'Buchpreis deutscher_buchpreis'"/>
Rebecca Wilm2f345ff2024-07-30 16:58:25 +0200421 </xsl:attribute>
422 </xsl:element>
423 </xsl:if>
Marc Kupietz1a422662024-03-16 09:34:10 +0100424 </biblStruct>
Nicolas Arnoldf84fcec2025-01-15 11:57:55 +0100425 <!-- NA -->
426 <reference assemblage="regular" type="complete"><xsl:value-of select="$long-reference"/></reference>
427 <reference assemblage="regular" type="short"><xsl:value-of select="$short-reference"/></reference>
428 <!-- END NA -->
Marc Kupietz1a422662024-03-16 09:34:10 +0100429 </sourceDesc>
430 </fileDesc>
431 <profileDesc>
Harald Luengenb81b63b2025-01-09 15:44:14 +0100432 <!-- outcommented HL -->
433 <!--creation>
Marc Kupietz1a422662024-03-16 09:34:10 +0100434 <creatDate><xsl:value-of select="$j"/></creatDate>
Harald Luengenb81b63b2025-01-09 15:44:14 +0100435 </creation-->
436 <!-- BEGIN HL -->
437 <xsl:call-template name="creation_temp">
438 <xsl:with-param name="j" select="$j"/>
439 </xsl:call-template>
440 <!-- END HL -->
Marc Kupietz1a422662024-03-16 09:34:10 +0100441 <textClass/>
442 <textDesc>
Marc Kupietz9d87e9d2024-05-05 15:56:50 +0200443 <textType><xsl:value-of select="$textFullGenre"/></textType>
444 <textTypeRef><xsl:value-of select="replace($textFullGenre, '.*: *', '')"/></textTypeRef>
Marc Kupietz1a422662024-03-16 09:34:10 +0100445 <textDomain/>
446 </textDesc>
447 </profileDesc>
448 </idsHeader>
449 <text>
450 <body>
Marc Kupietz6b6d4702024-09-12 17:54:10 +0200451 <!-- Call the template for each idref the spine -->
452 <xsl:apply-templates select="//opf:spine/opf:itemref" mode="collect"/>
Marc Kupietz1a422662024-03-16 09:34:10 +0100453 </body>
454 </text>
455 </idsText>
456 </idsDoc>
457 </xsl:template>
Harald Luengenb81b63b2025-01-09 15:44:14 +0100458
459 <!-- BEGIN HL -->
460 <xsl:template name="creation_temp">
461 <xsl:param name="j"/>
462 <creation>
463 <creatDate><xsl:value-of select="$j"/></creatDate>
464 </creation>
465 </xsl:template>
466 <!-- END HL -->
Marc Kupietz1a422662024-03-16 09:34:10 +0100467
Marc Kupietz6b6d4702024-09-12 17:54:10 +0200468 <xsl:template match="opf:itemref" mode="collect">
469 <xsl:variable name="id" select="@idref"/>
470 <xsl:variable name="item" select="//opf:manifest/opf:item[@id=$id and matches(@href, '\.x?html?$') and not(matches(@href, '(cover|toc|copyright|feedback|inhalt|nav|titlepage).*'))]"/>
471
472 <xsl:choose>
473 <xsl:when test = "$item">
474 <xsl:variable name="href" select="$item/@href"/>
475 <xsl:if test="$debug">
476 <xsl:message>
477 <xsl:text>converting: </xsl:text><xsl:value-of select="$id"/><xsl:text> </xsl:text><xsl:value-of select="$href"/><xsl:text> </xsl:text><xsl:value-of select="$idno"/>
478 </xsl:message>
479 </xsl:if>
480 <xsl:apply-templates select="doc(resolve-uri($href, base-uri()))/xhtml:html/xhtml:body"/>
481 </xsl:when>
482 <xsl:otherwise>
483 <xsl:if test="$debug">
484 <xsl:message>
485 <xsl:text>skipping: </xsl:text><xsl:value-of select="$id"/><xsl:text> </xsl:text><xsl:value-of select="$idno"/>
486 </xsl:message>
487 </xsl:if>
488 </xsl:otherwise>
489 </xsl:choose>
490 </xsl:template>
Marc Kupietz1a422662024-03-16 09:34:10 +0100491
492 <xsl:template match="xhtml:body">
493 <div type="chapter">
494 <xsl:apply-templates/>
495 </div>
496 </xsl:template>
497
Marc Kupietz4b1f5952024-04-13 20:04:56 +0000498 <xsl:template match="xhtml:body/text()">
499 <p>
500 <xsl:value-of select="."/>
501 </p>
502 </xsl:template>
503
Marc Kupietz1a422662024-03-16 09:34:10 +0100504 <xsl:template match="xhtml:title">
505 <head>
506 <xsl:apply-templates/>
507 </head>
508 </xsl:template>
509
510 <xsl:template match="xhtml:h1">
511 <head>
512 <xsl:apply-templates/>
513 </head>
514 </xsl:template>
515
Marc Kupietz3989c742024-04-21 17:33:49 +0200516 <xsl:template match="xhtml:h2|xhtml:h3|xhtml:h4|xhtml:h5|xhtml:h6">
Marc Kupietz1a422662024-03-16 09:34:10 +0100517 <head type="sub">
518 <xsl:apply-templates/>
519 </head>
520 </xsl:template>
521
Marc Kupietz99ec04b2024-03-16 11:30:03 +0100522 <xsl:template match="xhtml:em">
523 <emph>
524 <xsl:apply-templates/>
525 </emph>
526 </xsl:template>
Marc Kupietz1a422662024-03-16 09:34:10 +0100527
Marc Kupietz30cc0802024-04-10 16:37:04 +0200528 <xsl:template match="xhtml:span[matches(@class, '(bold|italic|big|kursiv| )+')]">
529 <xsl:variable name="class" select="replace(@class, 'kursiv', 'italic')"/>
530 <hi rend="{$class}">
531 <xsl:apply-templates/>
532 </hi>
533 </xsl:template>
534
Marc Kupietzad4d4462024-04-26 17:43:08 +0200535 <xsl:template match="xhtml:span[matches(@class, '(regular|norm)')]">
Marc Kupietz5e873112024-04-15 06:51:08 +0200536 <xsl:apply-templates/>
537 </xsl:template>
538
Marc Kupietz3989c742024-04-21 17:33:49 +0200539 <xsl:template match="xhtml:b|xhtml:span[@class='b']|xhtml:strong">
Marc Kupietz30cc0802024-04-10 16:37:04 +0200540 <hi rend="bold">
Marc Kupietz1a422662024-03-16 09:34:10 +0100541 <xsl:apply-templates/>
542 </hi>
543 </xsl:template>
544
Nicolas Arnoldc169e832024-06-07 08:44:11 +0200545 <xsl:template match="xhtml:i|xhtml:span[@class='i' or @class='it' or @class='Italic']|xhtml:span[@style='font-style:italic' or @style='font-style:italic;']">
Marc Kupietz4b1f5952024-04-13 20:04:56 +0000546 <hi rend="italic">
547 <xsl:apply-templates/>
548 </hi>
549 </xsl:template>
550
551
Marc Kupietz99ec04b2024-03-16 11:30:03 +0100552 <xsl:template match="xhtml:sub|xhtml:span[@class='sub']">
Marc Kupietz1a422662024-03-16 09:34:10 +0100553 <hi rend="sub">
554 <xsl:apply-templates/>
555 </hi>
556 </xsl:template>
557
Marc Kupietz99ec04b2024-03-16 11:30:03 +0100558 <xsl:template match="xhtml:sup|xhtml:span[@class='sup']">
Marc Kupietz1a422662024-03-16 09:34:10 +0100559 <hi rend="sup">
560 <xsl:apply-templates/>
561 </hi>
562 </xsl:template>
563
Marc Kupietz4b1f5952024-04-13 20:04:56 +0000564 <xsl:template match="xhtml:div[not(normalize-space(replace(., '&#160;', ' ')))]" priority="1.0"/>
Marc Kupietz1a422662024-03-16 09:34:10 +0100565
Marc Kupietzbf47ae72024-04-14 14:21:43 +0200566 <xsl:template match="xhtml:body/xhtml:div[./xhtml:h1|./xhtml:h2|./xhtml:h3]" priority="1.0">
567 <xsl:apply-templates/>
568 </xsl:template>
Marc Kupietz4b1f5952024-04-13 20:04:56 +0000569 <xsl:template match="xhtml:div/xhtml:div">
Marc Kupietz1a422662024-03-16 09:34:10 +0100570 <p>
571 <xsl:apply-templates/>
572 </p>
573 </xsl:template>
574
Marc Kupietz4b1f5952024-04-13 20:04:56 +0000575 <xsl:template match="xhtml:body/xhtml:div[(descendant::xhtml:p|descendant::xhtml:div)]">
576 <div type="section">
577 <xsl:apply-templates/>
578 </div>
579 </xsl:template>
580
581 <xsl:template match="xhtml:body/xhtml:div[not(descendant::xhtml:p|descendant::xhtml:div)]">
582 <div type="section">
583 <p>
584 <xsl:apply-templates/>
585 </p>
586 </div>
587 </xsl:template>
588
589 <xsl:template match="xhtml:p[not(descendant::xhtml:p|descendant::xhtml:div)]">
590 <xsl:if test="normalize-space(.)">
591 <p>
592 <xsl:apply-templates/>
593 </p>
594 </xsl:if>
595 </xsl:template>
596
597 <xsl:template match="xhtml:p[descendant::xhtml:p|descendant::xhtml:div]">
598 <xsl:if test="normalize-space(.)">
599 <div type="section">
600 <xsl:apply-templates/>
601 </div>
602 </xsl:if>
603 </xsl:template>
604
Marc Kupietz09745e12024-04-21 12:54:10 +0200605 <xsl:template match="xhtml:ul">
606 <list type="unordered">
607 <xsl:apply-templates/>
608 </list>
609 </xsl:template>
610 <xsl:template match="xhtml:ol">
611 <list type="ordered">
612 <xsl:apply-templates/>
613 </list>
614 </xsl:template>
615 <xsl:template match="xhtml:li">
616 <item>
617 <xsl:apply-templates/>
618 </item>
619 </xsl:template>
620 <xsl:template match="xhtml:nav">
Marc Kupietz1e6bfd12024-04-10 16:33:20 +0200621 <!-- <gap reason="toc"/> -->
622 </xsl:template>
623
Marc Kupietz1a422662024-03-16 09:34:10 +0100624 <xsl:template match="xhtml:img">
625 <!-- <gap reason="image"/> -->
626 </xsl:template>
627
Marc Kupietz1e6bfd12024-04-10 16:33:20 +0200628 <xsl:template match="xhtml:audio">
629 <!-- <gap reason="audio"/> -->
630 </xsl:template>
631
Marc Kupietz09745e12024-04-21 12:54:10 +0200632 <xsl:template match="xhtml:table">
633 <!-- <gap reason="table"/> -->
634 </xsl:template>
Marc Kupietz4b1f5952024-04-13 20:04:56 +0000635 <xsl:template match="xhtml:body/xhtml:a">
Marc Kupietz164a2832024-04-14 21:00:48 +0200636 <xsl:if test="normalize-space(.)">
637 <p>
638 <ref target="{@href}">
639 <xsl:apply-templates />
640 </ref>
641 </p>
642 </xsl:if>
Marc Kupietz4b1f5952024-04-13 20:04:56 +0000643 </xsl:template>
644
645 <xsl:template match="xhtml:body/xhtml:span">
Marc Kupietz7f3fe792024-07-26 15:28:26 +0200646 <xsl:if test="$debug">
647 <xsl:message>
648 <xsl:text>unhandled span element: </xsl:text><xsl:value-of select="concat(name(), ' ', string-join(./@*[normalize-space(.) != '']/concat(name(), ':', ., ' '), '_'))"/>
649 </xsl:message>
650 </xsl:if>
Marc Kupietz4b1f5952024-04-13 20:04:56 +0000651 <div type="section">
652 <p>
653 <xsl:value-of select="."/>
654 </p>
655 </div>
656 </xsl:template>
657 <xsl:template match="xhtml:span">
Marc Kupietz7f3fe792024-07-26 15:28:26 +0200658 <xsl:if test="$debug">
659 <xsl:message>
660 <xsl:text>unhandled span element: </xsl:text><xsl:value-of select="concat(name(), ' ', string-join(./@*[normalize-space(.) != '']/concat(name(), ':', ., ' '), '_'))"/>
661 </xsl:message>
662 </xsl:if>
Marc Kupietz4b1f5952024-04-13 20:04:56 +0000663 <xsl:value-of select="."/>
664 </xsl:template>
Marc Kupietz99ec04b2024-03-16 11:30:03 +0100665 <xsl:template match="xhtml:a">
Marc Kupietz164a2832024-04-14 21:00:48 +0200666 <xsl:if test="normalize-space(.)">
667 <ref target="{@href}">
668 <xsl:apply-templates />
669 </ref>
670 </xsl:if>
Marc Kupietz99ec04b2024-03-16 11:30:03 +0100671 </xsl:template>
672
Marc Kupietz54ec28b2024-04-27 10:07:06 +0200673 <xsl:template match="xhtml:br">
674 <lb/><xsl:text>&#10;</xsl:text>
675 </xsl:template>
Marc Kupietz99ec04b2024-03-16 11:30:03 +0100676
Marc Kupietz1a422662024-03-16 09:34:10 +0100677 <xsl:template match="xhtml:*">
Marc Kupietz7f3fe792024-07-26 15:28:26 +0200678 <xsl:if test="$debug">
679 <xsl:message>
680 <xsl:text>unhandled element: </xsl:text><xsl:value-of select="concat(name(), ' ', string-join(./@*[normalize-space(.) != '']/concat(name(), ':', ., ' '), '_'))"/>
681 </xsl:message>
682 </xsl:if>
Marc Kupietz4b1f5952024-04-13 20:04:56 +0000683 <xsl:choose>
684 <xsl:when test="descendant::xhtml:div|descendant::xhtml:p|parent::xhtml:body">
685 <div type="section">
686 <xsl:apply-templates/>
687 </div>
688 </xsl:when>
689 <xsl:otherwise>
690 <xsl:apply-templates select="./*|node()"/>
691 </xsl:otherwise>
692 </xsl:choose>
Marc Kupietz1a422662024-03-16 09:34:10 +0100693 <xsl:apply-templates/>
694 </xsl:template>
695
696 <xsl:function name="ids:reversedAuthors">
697 <xsl:param name="s" />
698 <xsl:value-of
699 select="
700 if (matches($s, ';')) then
701 concat(ids:reversedAuthors(substring-before($s, ' ; ')), ' ; ', ids:reversedAuthors(substring-after($s, ' ; ')))
702 else
703 replace($s, '(.+) (.+)', '$2, $1')"
704 />
705 </xsl:function>
706
707 <xsl:function name="hlu:reversedAuthors">
708 <xsl:param name="s"/>
709 <xsl:value-of
710 select="if (matches($s, ';')) then concat(ids:reversedAuthors(substring-before($s, ' ; ')), ' ; ', ids:reversedAuthors(substring-after($s, ' ; '))) else replace($s, '(.+),(.+)', '$2, $1')"
711 />
712 </xsl:function>
713
Marc Kupietz10903f32024-04-14 14:21:18 +0200714 <xsl:variable name="city-country-map" as="map(xs:string, xs:string)">
715 <xsl:map>
716 <xsl:map-entry key="'Axams'" select="'AT'"/>
717 <xsl:map-entry key="'Vienna'" select="'AT'"/>
718 <xsl:map-entry key="'Klagenfurt'" select="'AT'"/>
719 <xsl:map-entry key="'Graz'" select="'AT'"/>
720 <xsl:map-entry key="'Innsbruck'" select="'AT'"/>
721 <xsl:map-entry key="'Salzburg'" select="'AT'"/>
722 <xsl:map-entry key="'Bern'" select="'CH'"/>
723 <xsl:map-entry key="'Biel/Bienne'" select="'CH'"/>
724 <xsl:map-entry key="'Zurich'" select="'CH'"/>
725 <xsl:map-entry key="'Basel'" select="'CH'"/>
726 <xsl:map-entry key="'Geneva'" select="'CH'"/>
727 <xsl:map-entry key="'Lucerne'" select="'CH'"/>
728 <xsl:map-entry key="'Lausanne'" select="'CH'"/>
729 <xsl:map-entry key="'Winterthur'" select="'CH'"/>
730 <xsl:map-entry key="'St. Gallen'" select="'CH'"/>
731 <xsl:map-entry key="'Interlaken'" select="'CH'"/>
732 <xsl:map-entry key="'Brussels'" select="'BE'"/>
733 <xsl:map-entry key="'Antwerp'" select="'BE'"/>
734 <xsl:map-entry key="'Ghent'" select="'BE'"/>
735 <xsl:map-entry key="'Bruges'" select="'BE'"/>
736 <xsl:map-entry key="'Leuven'" select="'BE'"/>
737 <xsl:map-entry key="'Liege'" select="'BE'"/>
738 <xsl:map-entry key="'Charleroi'" select="'BE'"/>
739 <xsl:map-entry key="'Namur'" select="'BE'"/>
740 <xsl:map-entry key="'Mons'" select="'BE'"/>
741 <xsl:map-entry key="'Bangkok'" select="'TH'"/>
742 <xsl:map-entry key="'Copenhagen'" select="'DK'"/>
743 <xsl:map-entry key="'colatina'" select="'BR'"/>
744 <xsl:map-entry key="'Oakland Park'" select="'US'"/>
745 <xsl:map-entry key="'Istanbul'" select="'TR'"/>
746 <xsl:map-entry key="'Luxemburg'" select="'LU'"/>
747 <xsl:map-entry key="'Palma de Mallorca'" select="'ES'"/>
748 <xsl:map-entry key="'Swakopmund'" select="'NA'"/>
749 <xsl:map-entry key="'Victoria'" select="'CA'"/>
750 <xsl:map-entry key="'Wien'" select="'AT'"/>
751 <xsl:map-entry key="'Windhoek'" select="'NA'"/>
752 <xsl:map-entry key="'Zuerich'" select="'CH'"/>
753 <xsl:map-entry key="'Zürich'" select="'CH'"/>
754 <xsl:map-entry key="'Zug'" select="'CH'"/>
755 <xsl:map-entry key="'ZÜRICH'" select="'CH'"/>
756 </xsl:map>
Marc Kupietzd8599fc2024-04-14 13:16:56 +0200757
Marc Kupietz10903f32024-04-14 14:21:18 +0200758 </xsl:variable>
759
760 <!-- Define the function -->
761 <xsl:function name="ids:country-city" as="xs:string">
762 <xsl:param name="city" as="xs:string"/>
763 <xsl:sequence select="if (map:contains($city-country-map, $city)) then map:get($city-country-map, $city) else 'DE'"/>
764 </xsl:function>
Marc Kupietz1a422662024-03-16 09:34:10 +0100765</xsl:stylesheet>