1 | <dbx:transform xmlns:dbx="http://www.windhouwer.nl/sloot/dbx" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dcr="http://www.isocat.org/ns/dcr" xmlns:dcif="http://www.isocat.org/ns/dcif" xmlns:isocat="http://www.isocat.org/"> |
---|
2 | |
---|
3 | <dbx:param name="dcs"/> |
---|
4 | <!-- the ids of the selected DCs --> |
---|
5 | |
---|
6 | <dbx:param name="props"/> |
---|
7 | |
---|
8 | <dbx:param name="gi" value="true"/> |
---|
9 | |
---|
10 | <dbx:param name="mode" value="all"/> |
---|
11 | <!-- list, domains or all --> |
---|
12 | |
---|
13 | <dbx:param name="suppress" value="true"/> |
---|
14 | <dbx:param name="suppress-context" value=""/> |
---|
15 | <!-- empty or profile or dcs id --> |
---|
16 | <dbx:param name="suppress-context-type" value=""/> |
---|
17 | <!-- empty or profile or dcs --> |
---|
18 | |
---|
19 | <dbx:param name="view-profiles" value=""/> |
---|
20 | <dbx:param name="view-working-languages" value=""/> |
---|
21 | <dbx:param name="view-object-languages" value=""/> |
---|
22 | |
---|
23 | <dbx:param name="parse-xml-constraints" value="true"/> |
---|
24 | |
---|
25 | <dbx:variable name="keyset" select="$dcs/dcs/dc/@ref"/> |
---|
26 | |
---|
27 | <dbx:variable name="suppress-query" when="$suppress-context-type='profile' or $suppress-context-type='dcs'" query=" |
---|
28 | SELECT |
---|
29 | dc |
---|
30 | FROM |
---|
31 | view_{$suppress-context-type} |
---|
32 | WHERE |
---|
33 | {$suppress-context-type} = {$suppress-context} |
---|
34 | { |
---|
35 | if ($suppress-context-type='profile') |
---|
36 | then ('AND private = false') |
---|
37 | else ('') |
---|
38 | } |
---|
39 | ; |
---|
40 | "/> |
---|
41 | <dbx:variable name="suppress-query" when="$suppress-context-type!='profile' and $suppress-context-type!='dcs'" select="()"/> |
---|
42 | <dbx:variable name="suppress-keyset" select=" |
---|
43 | if ( |
---|
44 | $suppress='true' |
---|
45 | ) then ( |
---|
46 | if ( |
---|
47 | $suppress-context-type='profile' or $suppress-context-type='dcs' |
---|
48 | ) then ( |
---|
49 | $suppress-query//dc |
---|
50 | ) else ( |
---|
51 | $keyset |
---|
52 | ) |
---|
53 | ) else () |
---|
54 | "/> |
---|
55 | |
---|
56 | <dbx:variable name="profiles" when="normalize-space($view-profiles)!=''" query=" |
---|
57 | SELECT |
---|
58 | id |
---|
59 | FROM |
---|
60 | core_profile |
---|
61 | WHERE |
---|
62 | name IN ('{string-join(tokenize(replace($view-profiles,'''',''''''),'\|'),''',''')}') |
---|
63 | ; |
---|
64 | "/> |
---|
65 | <dbx:variable name="profiles" when="normalize-space($view-profiles)=''" select="()"/> |
---|
66 | <dbx:variable name="object-languages" when="normalize-space($view-object-languages)!=''" query=" |
---|
67 | SELECT |
---|
68 | id |
---|
69 | FROM |
---|
70 | core_language |
---|
71 | WHERE |
---|
72 | tag IN ('{string-join(tokenize($view-object-languages,'\|'),''',''')}') |
---|
73 | ; |
---|
74 | "/> |
---|
75 | <dbx:variable name="object-languages" when="normalize-space($view-object-languages)=''" select="()"/> |
---|
76 | <dbx:variable name="working-languages" when="normalize-space($view-working-languages)!=''" query=" |
---|
77 | SELECT |
---|
78 | id |
---|
79 | FROM |
---|
80 | core_language |
---|
81 | WHERE |
---|
82 | tag IN ('{string-join(tokenize($view-working-languages,'\|'),''',''')}') |
---|
83 | ; |
---|
84 | "/> |
---|
85 | <dbx:variable name="working-languages" when="normalize-space($view-working-languages)=''" select="()"/> |
---|
86 | |
---|
87 | <dbx:variable name="name" select="($dcs/dcs/@name,$dcs/dcs/@type)[1]"/> |
---|
88 | <dbx:variable name="owner" select="$dcs/dcs/@owner"/> |
---|
89 | |
---|
90 | <!-- prefetch languages --> |
---|
91 | <dbx:variable name="core_language" query="SELECT * FROM core_language;"/> |
---|
92 | |
---|
93 | <dbx:preprocess/> |
---|
94 | |
---|
95 | <dbx:template name="profile-trail"> |
---|
96 | <dbx:choose> |
---|
97 | <dbx:when test="exists($profile) and normalize-space($profile)!=''"> |
---|
98 | <dbx:for-each table="core_profile" min="1" max="1"> |
---|
99 | <dbx:where field="id" select="$profile"/> |
---|
100 | <dcif:profile isocat:id="{$current/id}" isocat:member="{$member}" dbx:field="name" dcr:datcat="http://www.isocat.org/datcat/DC-37"/> |
---|
101 | <dbx:variable name="profile" select="$current/parent"/> |
---|
102 | <dbx:variable name="member" value="false"/> |
---|
103 | <dbx:call-template name="profile-trail"/> |
---|
104 | </dbx:for-each> |
---|
105 | </dbx:when> |
---|
106 | </dbx:choose> |
---|
107 | </dbx:template> |
---|
108 | |
---|
109 | <dbx:template name="data_category-summary"> |
---|
110 | <dbx:for-each table="core_user" min="0" max="1"> |
---|
111 | <dbx:where field="id" select="$current/owner" type="integer"/> |
---|
112 | <dbx:attribute name="owner" select="if (normalize-space($current/last_name)!='') then (if (normalize-space($current/first_name)!='') then (concat($current/last_name,', ',$current/first_name)) else ($current/last_name)) else ($current/login)"/> |
---|
113 | </dbx:for-each> |
---|
114 | <dbx:for-each table="core_thematic_domain_group" min="0" max="1"> |
---|
115 | <dbx:where field="id" select="$current/owner" type="integer"/> |
---|
116 | <dbx:attribute name="owner" select="concat('TDG: ',$current/name)"/> |
---|
117 | </dbx:for-each> |
---|
118 | <dbx:attribute name="identifier" field="identifier"/> |
---|
119 | <dbx:attribute name="version" field="version"/> |
---|
120 | <dbx:attribute name="name" field="name"/> |
---|
121 | <dbx:variable name="def" query=" |
---|
122 | SELECT |
---|
123 | text |
---|
124 | FROM |
---|
125 | view_text |
---|
126 | JOIN |
---|
127 | core_language_section |
---|
128 | ON |
---|
129 | view_text.owner = core_language_section.id |
---|
130 | AND |
---|
131 | view_text.owner_type = 'language section' |
---|
132 | AND |
---|
133 | view_text.text_type = 'definition' |
---|
134 | AND |
---|
135 | core_language_section.dc = {$current/id} |
---|
136 | JOIN |
---|
137 | core_language |
---|
138 | ON |
---|
139 | core_language_section.language = core_language.id |
---|
140 | AND |
---|
141 | core_language.tag = 'en' |
---|
142 | LIMIT |
---|
143 | 1 |
---|
144 | ; |
---|
145 | "/> |
---|
146 | <dbx:attribute name="definition" select="$def" when="normalize-space($def)!=''"/> |
---|
147 | </dbx:template> |
---|
148 | |
---|
149 | <dbx:template name="data_category-lineage"> |
---|
150 | <dbx:choose> |
---|
151 | <dbx:when test="normalize-space($current/previous)!=''"> |
---|
152 | <dbx:attribute name="isocat:previous" field="previous"/> |
---|
153 | <dbx:for-each table="core_data_category" min="1" max="1"> |
---|
154 | <dbx:where field="id" select="$current/previous" type="integer"/> |
---|
155 | <dbx:attribute name="previous" field="pid"/> |
---|
156 | <isocat:previous> |
---|
157 | <dbx:call-template name="data_category-reference"/> |
---|
158 | </isocat:previous> |
---|
159 | </dbx:for-each> |
---|
160 | </dbx:when> |
---|
161 | </dbx:choose> |
---|
162 | <dbx:choose> |
---|
163 | <dbx:when test="normalize-space($current/next)!=''"> |
---|
164 | <dbx:attribute name="isocat:next" field="next"/> |
---|
165 | <dbx:for-each table="core_data_category" min="1" max="1"> |
---|
166 | <dbx:where field="id" select="$current/next" type="integer"/> |
---|
167 | <dbx:attribute name="next" field="pid"/> |
---|
168 | <isocat:next> |
---|
169 | <dbx:call-template name="data_category-reference"/> |
---|
170 | </isocat:next> |
---|
171 | </dbx:for-each> |
---|
172 | </dbx:when> |
---|
173 | </dbx:choose> |
---|
174 | </dbx:template> |
---|
175 | |
---|
176 | <dbx:template name="data_category-reference"> |
---|
177 | <dbx:attribute name="pid" field="pid"/> |
---|
178 | <!-- a summary of the referred DC --> |
---|
179 | <dbx:attribute name="isocat:id" field="id"/> |
---|
180 | <dbx:attribute name="isocat:identifier" field="identifier"/> |
---|
181 | <dbx:attribute name="isocat:version" field="version"/> |
---|
182 | <dbx:attribute name="isocat:name" field="name"/> |
---|
183 | <dbx:for-each table="link_simple_data_category_super" min="0" max="1"> |
---|
184 | <dbx:where field="dc" select="$current/id"/> |
---|
185 | <dbx:attribute name="isocat:isa" field="super"/> |
---|
186 | </dbx:for-each> |
---|
187 | |
---|
188 | <dbx:choose> |
---|
189 | <dbx:when test="$mode!='all'"> |
---|
190 | <dbx:call-template name="data_category-summary"/> |
---|
191 | </dbx:when> |
---|
192 | </dbx:choose> |
---|
193 | <!-- if the simple DC isn't part of this DCS we should suppress it --> |
---|
194 | <dbx:choose> |
---|
195 | <dbx:when test="$suppress='true' and empty(index-of($suppress-keyset,$current/id))"> |
---|
196 | <dbx:attribute name="isocat:suppress" value="true"/> |
---|
197 | </dbx:when> |
---|
198 | </dbx:choose> |
---|
199 | <!-- add type info for checking purposes --> |
---|
200 | <dbx:attribute name="isocat:type" field="type"/> |
---|
201 | <!-- add scope info for checking purposes --> |
---|
202 | <dbx:choose> |
---|
203 | <dbx:when test="$current/private='true'"> |
---|
204 | <dbx:attribute name="isocat:scope" value="private"/> |
---|
205 | </dbx:when> |
---|
206 | <dbx:otherwise> |
---|
207 | <dbx:attribute name="isocat:scope" value="public"/> |
---|
208 | </dbx:otherwise> |
---|
209 | </dbx:choose> |
---|
210 | <!-- add profile info for checking purposes --> |
---|
211 | <dbx:for-each table="link_profile_members" min="1" max="*"> |
---|
212 | <dbx:where field="dc" select="$current/id"/> |
---|
213 | <dbx:for-each table="core_profile" min="1" max="1"> |
---|
214 | <dbx:where field="id" select="$current/profile"/> |
---|
215 | <isocat:profile isocat:id="{$current/id}" dbx:field="name"/> |
---|
216 | </dbx:for-each> |
---|
217 | </dbx:for-each> |
---|
218 | </dbx:template> |
---|
219 | |
---|
220 | <dbx:template name="value"> |
---|
221 | <dbx:for-each table="core_data_category" min="1" max="1"> |
---|
222 | <dbx:where field="id" select="$current/dc"/> |
---|
223 | <dbx:project field="*"/> |
---|
224 | <dcif:value dcr:datcat="http://www.isocat.org/datcat/DC-2407"> |
---|
225 | <dbx:call-template name="data_category-reference"/> |
---|
226 | </dcif:value> |
---|
227 | </dbx:for-each> |
---|
228 | </dbx:template> |
---|
229 | |
---|
230 | <dbx:template name="linguistic_section-core"> |
---|
231 | <dbx:for-each table="core_linguistic_section" min="1" max="1"> |
---|
232 | <dbx:where field="id" select="$current/id"/> |
---|
233 | <dcif:language isocat:id="{$current/language}" isocat:direction="{$core_language//row[id=$current/language]/direction}" isocat:name="{$core_language//row[id=$current/language]/name}" dcr:datcat="http://www.isocat.org/datcat/DC-35"> |
---|
234 | <dbx:value-of select="$core_language//row[id=$current/language]/tag"/> |
---|
235 | </dcif:language> |
---|
236 | </dbx:for-each> |
---|
237 | <dbx:choose> |
---|
238 | <dbx:when test="$mode='all'"> |
---|
239 | <dbx:for-each table="generic_text" min="0" max="*"> |
---|
240 | <dbx:where field="owner" select="$current/id" type="integer"/> |
---|
241 | <dbx:where field="owner_type" value="linguistic section" type="string"/> |
---|
242 | <dbx:where field="text_type" value="linguistic example" type="string"/> |
---|
243 | <dbx:sort field="id"/> |
---|
244 | <dcif:exampleSection isocat:id="{$current/id}" dcr:datcat="http://www.isocat.org/datcat/DC-2403"> |
---|
245 | <dcif:example dbx:field="text" dcr:datcat="http://www.isocat.org/datcat/DC-33"> |
---|
246 | <dbx:attribute name="xml:lang" select="$core_language//row[id=$current/language]/tag"/> |
---|
247 | </dcif:example> |
---|
248 | <dcif:source dbx:field="source" dcr:datcat="http://www.isocat.org/datcat/DC-27" dbx:when="normalize-space(.)!=''"/> |
---|
249 | </dcif:exampleSection> |
---|
250 | </dbx:for-each> |
---|
251 | <dbx:for-each table="generic_text" min="0" max="*"> |
---|
252 | <dbx:where field="owner" select="$current/id" type="integer"/> |
---|
253 | <dbx:where field="owner_type" value="linguistic section" type="string"/> |
---|
254 | <dbx:where field="text_type" value="linguistic explanation" type="string"/> |
---|
255 | <dbx:sort field="id"/> |
---|
256 | <dcif:explanationSection isocat:id="{$current/id}" dcr:datcat="http://www.isocat.org/datcat/DC-2404"> |
---|
257 | <dcif:explanation dbx:field="text" dcr:datcat="http://www.isocat.org/datcat/DC-34"> |
---|
258 | <dbx:attribute name="xml:lang" select="$core_language//row[id=$current/language]/tag"/> |
---|
259 | </dcif:explanation> |
---|
260 | <dcif:source dbx:field="source" dcr:datcat="http://www.isocat.org/datcat/DC-27" dbx:when="normalize-space(.)!=''"/> |
---|
261 | </dcif:explanationSection> |
---|
262 | </dbx:for-each> |
---|
263 | <dbx:for-each table="generic_text" min="0" max="*"> |
---|
264 | <dbx:where field="owner" select="$current/id" type="integer"/> |
---|
265 | <dbx:where field="owner_type" value="linguistic section" type="string"/> |
---|
266 | <dbx:where field="text_type" value="note" type="string"/> |
---|
267 | <dbx:sort field="id"/> |
---|
268 | <dcif:note isocat:id="{$current/id}" dbx:field="text" dcr:datcat="http://www.isocat.org/datcat/DC-36"> |
---|
269 | <dbx:attribute name="xml:lang" select="$core_language//row[id=$current/language]/tag"/> |
---|
270 | </dcif:note> |
---|
271 | </dbx:for-each> |
---|
272 | </dbx:when> |
---|
273 | </dbx:choose> |
---|
274 | </dbx:template> |
---|
275 | |
---|
276 | <dbx:template name="constrained_conceptual_domain"> |
---|
277 | <dbx:for-each table="core_conceptual_domain_rule" min="1" max="1"> |
---|
278 | <dbx:where field="id" select="$current/cd"/> |
---|
279 | <dcif:conceptualDomain isocat:id="{$current/id}" type="constrained" dcr:datcat="http://www.isocat.org/datcat/DC-4"> |
---|
280 | <dbx:for-each table="core_conceptual_domain" min="1" max="1"> |
---|
281 | <dbx:where field="id" select="$current/id"/> |
---|
282 | <dbx:for-each table="core_data_type" min="1" max="1"> |
---|
283 | <dbx:where field="id" select="$current/data_type"/> |
---|
284 | <dcif:dataType isocat:id="{$current/id}" dbx:field="data_type" dcr:datcat="http://www.isocat.org/datcat/DC-2397"/> |
---|
285 | </dbx:for-each> |
---|
286 | </dbx:for-each> |
---|
287 | <dbx:variable name="rule_type" field="rule_type"/> |
---|
288 | <dbx:for-each table="core_rule_type" min="1" max="1"> |
---|
289 | <dbx:where field="id" select="$rule_type"/> |
---|
290 | <dcif:ruleType isocat:id="{$current/id}" dbx:field="rule_type" dcr:datcat="http://www.isocat.org/datcat/DC-2405"/> |
---|
291 | </dbx:for-each> |
---|
292 | <dbx:for-each table="core_rule" min="1" max="*"> |
---|
293 | <dbx:where field="cd" select="$current/id"/> |
---|
294 | <dcif:rule isocat:id="{$current/id}" dcr:datcat="http://www.isocat.org/datcat/DC-2406"> |
---|
295 | <dbx:variable name="rule" field="rule"/> |
---|
296 | <dbx:for-each table="core_rule_type" min="1" max="1"> |
---|
297 | <dbx:where field="id" select="$rule_type"/> |
---|
298 | <dbx:choose> |
---|
299 | <dbx:when test="$parse-xml-constraints!='false' and $current/xml='true'"> |
---|
300 | <dbx:parse select="$rule"/> |
---|
301 | </dbx:when> |
---|
302 | <dbx:otherwise> |
---|
303 | <dbx:value-of select="$rule"/> |
---|
304 | </dbx:otherwise> |
---|
305 | </dbx:choose> |
---|
306 | </dbx:for-each> |
---|
307 | </dcif:rule> |
---|
308 | </dbx:for-each> |
---|
309 | </dcif:conceptualDomain> |
---|
310 | </dbx:for-each> |
---|
311 | </dbx:template> |
---|
312 | |
---|
313 | <dbx:process> |
---|
314 | <dcif:dataCategorySelection dcif-version="1.3" xmlns:isocat="http://www.isocat.org/" xmlns:xi="http://www.w3.org/2001/XInclude"> |
---|
315 | <dbx:choose> |
---|
316 | <dbx:when test="exists($name) and (normalize-space($name)!='')"> |
---|
317 | <dbx:attribute name="name" select="$name"/> |
---|
318 | </dbx:when> |
---|
319 | </dbx:choose> |
---|
320 | <dbx:choose> |
---|
321 | <dbx:when test="exists($owner) and (normalize-space($owner)!='')"> |
---|
322 | <dbx:attribute name="owner" select="$owner"/> |
---|
323 | </dbx:when> |
---|
324 | </dbx:choose> |
---|
325 | <dbx:choose> |
---|
326 | <dbx:when test="$gi='true'"> |
---|
327 | <dcif:globalInformation dcr:datcat="http://www.isocat.org/datcat/DC-2411"> |
---|
328 | Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands |
---|
329 | </dcif:globalInformation> |
---|
330 | </dbx:when> |
---|
331 | </dbx:choose> |
---|
332 | <dbx:for-each select="$keyset" as="key" min="0" max="*"> |
---|
333 | <dbx:for-each table="core_data_category" min="1" max="1"> |
---|
334 | <dbx:where field="id" select="$key" type="integer"/> |
---|
335 | <dbx:cache id="/dc/{$key}/DCIF-M-{$mode}-S-{$suppress}-{$suppress-context-type}-{$suppress-context}-P-{string-join($profiles,'-')}-WL-{string-join($working-languages,'-')}-OL-{string-join($object-languages,'-')}-X-{$parse-xml-constraints}"> |
---|
336 | <dcif:dataCategory isocat:id="{$current/id}" isocat:identifier="{$current/identifier}" isocat:name="{$current/name}" isocat:owner_id="{$current/owner}" dcr:datcat="http://www.isocat.org/datcat/DC-48"> |
---|
337 | <dbx:for-each table="core_user" min="0" max="1"> |
---|
338 | <dbx:where field="id" select="$current/owner" type="integer"/> |
---|
339 | <dbx:attribute name="isocat:owner" select="if (normalize-space($current/last_name)!='') then (if (normalize-space($current/first_name)!='') then (concat($current/last_name,', ',$current/first_name)) else ($current/last_name)) else ($current/login)"/> |
---|
340 | <dbx:attribute name="isocat:owner_forum" field="forum" when="normalize-space(@*:owner_forum)!=''"/> |
---|
341 | </dbx:for-each> |
---|
342 | <dbx:for-each table="core_thematic_domain_group" min="0" max="1"> |
---|
343 | <dbx:where field="id" select="$current/owner" type="integer"/> |
---|
344 | <dbx:attribute name="isocat:owner" select="concat('TDG: ',$current/name)"/> |
---|
345 | </dbx:for-each> |
---|
346 | <dbx:attribute name="isocat:type" field="type"/> |
---|
347 | <dbx:choose> |
---|
348 | <dbx:when test="$current/type='simple'"> |
---|
349 | <dbx:attribute name="type" value="simple"/> |
---|
350 | </dbx:when> |
---|
351 | <dbx:when test="exists(index-of(('open','constrained','closed'),$current/type))"> |
---|
352 | <dbx:attribute name="type" value="complex"/> |
---|
353 | </dbx:when> |
---|
354 | <dbx:when test="$current/type='container'"> |
---|
355 | <dbx:attribute name="type" value="container"/> |
---|
356 | </dbx:when> |
---|
357 | <dbx:otherwise> |
---|
358 | <dbx:attribute name="type" value="unknown"/> |
---|
359 | </dbx:otherwise> |
---|
360 | </dbx:choose> |
---|
361 | <dbx:attribute name="pid" field="pid"/> |
---|
362 | <dbx:choose> |
---|
363 | <dbx:when test="$current/private='true'"> |
---|
364 | <dbx:attribute name="isocat:scope" value="private"/> |
---|
365 | </dbx:when> |
---|
366 | <dbx:otherwise> |
---|
367 | <dbx:attribute name="isocat:scope" value="public"/> |
---|
368 | </dbx:otherwise> |
---|
369 | </dbx:choose> |
---|
370 | <dbx:choose> |
---|
371 | <dbx:when test="$mode!='all'"> |
---|
372 | <dbx:call-template name="data_category-summary"/> |
---|
373 | </dbx:when> |
---|
374 | </dbx:choose> |
---|
375 | <dbx:call-template name="data_category-lineage"/> |
---|
376 | <dbx:for-each table="core_recommendation" min="0" max="*"> |
---|
377 | <dbx:where field="dc" select="$key" type="integer"/> |
---|
378 | <dbx:for-each table="core_adhoc_group" min="0" max="1"> |
---|
379 | <dbx:where field="id" select="$current/group" type="integer"/> |
---|
380 | <isocat:recommendedBy id="{$current/id}" dbx:field="name"/> |
---|
381 | </dbx:for-each> |
---|
382 | <dbx:for-each table="core_thematic_domain_group" min="0" max="1"> |
---|
383 | <dbx:where field="id" select="$current/group" type="integer"/> |
---|
384 | <isocat:recommendedBy id="{$current/id}"> |
---|
385 | <dbx:value-of select="concat('TDG: ',$current/name)"/> |
---|
386 | </isocat:recommendedBy> |
---|
387 | </dbx:for-each> |
---|
388 | </dbx:for-each> |
---|
389 | <dbx:choose> |
---|
390 | <dbx:when test="$mode='all'"> |
---|
391 | <dcif:administrationInformationSection isocat:id="{$current/id}" dcr:datcat="http://www.isocat.org/datcat/DC-51"> |
---|
392 | <dcif:administrationRecord isocat:id="{$current/id}" dcr:datcat="http://www.isocat.org/datcat/DC-52"> |
---|
393 | <dcif:identifier dbx:field="identifier" dcr:datcat="http://www.isocat.org/datcat/DC-8"/> |
---|
394 | <dcif:version dbx:field="version" dcr:datcat="http://www.isocat.org/datcat/DC-2400"> |
---|
395 | <dbx:attribute name="isocat:branch" field="branch"/> |
---|
396 | <dbx:attribute name="isocat:revision" field="revision"/> |
---|
397 | <dbx:attribute name="isocat:sidebranches" field="sidebranches"/> |
---|
398 | </dcif:version> |
---|
399 | <dcif:registrationStatus dcr:datcat="http://www.isocat.org/datcat/DC-21" dbx:field="registration_status"> |
---|
400 | <dbx:choose> |
---|
401 | <dbx:when test="$current/registration_status='candidate'"> |
---|
402 | <dbx:attribute name="dcr:valueDatcat" value="http://www.isocat.org/datcat/DC-24"/> |
---|
403 | </dbx:when> |
---|
404 | <dbx:when test="$current/registration_status='standard'"> |
---|
405 | <dbx:attribute name="dcr:valueDatcat" value="http://www.isocat.org/datcat/DC-22"/> |
---|
406 | </dbx:when> |
---|
407 | <dbx:when test="$current/registration_status='deprecated'"> |
---|
408 | <dbx:attribute name="dcr:valueDatcat" value="http://www.isocat.org/datcat/DC-2401"/> |
---|
409 | </dbx:when> |
---|
410 | <dbx:when test="$current/registration_status='superseded'"> |
---|
411 | <dbx:attribute name="dcr:valueDatcat" value="http://www.isocat.org/datcat/DC-26"/> |
---|
412 | </dbx:when> |
---|
413 | </dbx:choose> |
---|
414 | </dcif:registrationStatus> |
---|
415 | <isocat:administrationStatus dcr:datcat="http://www.isocat.org/datcat/DC-2" dbx:field="administration_status"/> |
---|
416 | <dcif:justification dbx:field="justification" dcr:datcat="http://www.isocat.org/datcat/DC-2410" dbx:when="normalize-space(.)!=''"/> |
---|
417 | <dbx:for-each table="generic_text" min="0" max="*"> |
---|
418 | <dbx:where field="owner" select="$current/id" type="integer"/> |
---|
419 | <dbx:where field="owner_type" value="data category" type="string"/> |
---|
420 | <dbx:where field="text_type" value="administration note" type="string"/> |
---|
421 | <isocat:administrationNote isocat:id="{$current/id}" dbx:field="text"> |
---|
422 | <dbx:attribute name="xml:lang" select="$core_language//row[id=$current/language]/tag"/> |
---|
423 | </isocat:administrationNote> |
---|
424 | </dbx:for-each> |
---|
425 | <dcif:origin dbx:field="origin" dcr:datcat="http://www.isocat.org/datcat/DC-19" dbx:when="normalize-space(.)!=''"/> |
---|
426 | <dbx:for-each table="generic_text" min="0" max="*"> |
---|
427 | <dbx:where field="owner" select="$current/id" type="integer"/> |
---|
428 | <dbx:where field="owner_type" value="data category" type="string"/> |
---|
429 | <dbx:where field="text_type" value="explanatory comment" type="string"/> |
---|
430 | <dcif:explanatoryComment isocat:id="{$current/id}" dbx:field="text" dcr:datcat="http://www.isocat.org/datcat/DC-7"> |
---|
431 | <dbx:attribute name="xml:lang" select="$core_language//row[id=$current/language]/tag"/> |
---|
432 | </dcif:explanatoryComment> |
---|
433 | </dbx:for-each> |
---|
434 | <dbx:for-each table="generic_text" min="0" max="*"> |
---|
435 | <dbx:where field="owner" select="$current/id" type="integer"/> |
---|
436 | <dbx:where field="owner_type" value="data category" type="string"/> |
---|
437 | <dbx:where field="text_type" value="unresolved issue" type="string"/> |
---|
438 | <dcif:unresolvedIssue isocat:id="{$current/id}" dbx:field="text" dcr:datcat="http://www.isocat.org/datcat/DC-29"> |
---|
439 | <dbx:attribute name="xml:lang" select="$core_language//row[id=$current/language]/tag"/> |
---|
440 | </dcif:unresolvedIssue> |
---|
441 | </dbx:for-each> |
---|
442 | <dcif:effectiveDate dbx:field="effective_date" dcr:datcat="http://www.isocat.org/datcat/DC-6" dbx:when="normalize-space(.)!=''"/> |
---|
443 | <dcif:untilDate dbx:field="until_date" dcr:datcat="http://www.isocat.org/datcat/DC-30" dbx:when="normalize-space(.)!=''"/> |
---|
444 | <dbx:for-each table="generic_text" min="1" max="*"> |
---|
445 | <dbx:where field="owner" select="$current/id" type="integer"/> |
---|
446 | <dbx:where field="owner_type" value="data category" type="string"/> |
---|
447 | <dbx:where field="text_type" value="change" type="string"/> |
---|
448 | <dbx:sort field="timestamp" order="ascending"/> |
---|
449 | <dbx:choose> |
---|
450 | <dbx:when test="$current-pos = 1"> |
---|
451 | <dcif:creation isocat:id="{$current/id}" dcr:datcat="http://www.isocat.org/datcat/DC-2398"> |
---|
452 | <dcif:creationDate dbx:field="date" dcr:datcat="http://www.isocat.org/datcat/DC-5"/> |
---|
453 | <dcif:changeDescription dbx:field="text" dcr:datcat="http://www.isocat.org/datcat/DC-3"> |
---|
454 | <dbx:attribute name="xml:lang" select="$core_language//row[id=$current/language]/tag"/> |
---|
455 | </dcif:changeDescription> |
---|
456 | </dcif:creation> |
---|
457 | </dbx:when> |
---|
458 | <dbx:when test="($current-size > 1) and ($current-pos = $current-size)"> |
---|
459 | <dcif:lastChange isocat:id="{$current/id}" dcr:datcat="http://www.isocat.org/datcat/DC-2399"> |
---|
460 | <dcif:lastChangeDate dbx:field="date" dcr:datcat="http://www.isocat.org/datcat/DC-9"/> |
---|
461 | <dcif:changeDescription dbx:field="text" dcr:datcat="http://www.isocat.org/datcat/DC-3"> |
---|
462 | <dbx:attribute name="xml:lang" select="$core_language//row[id=$current/language]/tag"/> |
---|
463 | </dcif:changeDescription> |
---|
464 | </dcif:lastChange> |
---|
465 | </dbx:when> |
---|
466 | </dbx:choose> |
---|
467 | <isocat:change isocat:id="{$current/id}"> |
---|
468 | <dbx:attribute name="xml:lang" select="$core_language//row[id=$current/language]/tag"/> |
---|
469 | <dbx:attribute name="timestamp" field="timestamp"/> |
---|
470 | <dbx:value-of field="text"/> |
---|
471 | </isocat:change> |
---|
472 | </dbx:for-each> |
---|
473 | </dcif:administrationRecord> |
---|
474 | </dcif:administrationInformationSection> |
---|
475 | </dbx:when> |
---|
476 | </dbx:choose> |
---|
477 | <dbx:choose> |
---|
478 | <dbx:when test="$mode='all' "> |
---|
479 | <dcif:descriptionSection isocat:id="{$current/id}" dcr:datcat="http://www.isocat.org/datcat/DC-49"> |
---|
480 | <dbx:for-each table="link_profile_members" min="1" max="*"> |
---|
481 | <dbx:where field="dc" select="$current/id"/> |
---|
482 | <dbx:variable name="profile" select="$current/profile"/> |
---|
483 | <dbx:variable name="member" value="true"/> |
---|
484 | <dbx:call-template name="profile-trail"/> |
---|
485 | </dbx:for-each> |
---|
486 | <dbx:for-each table="generic_name" min="0" max="*"> |
---|
487 | <dbx:where field="owner" select="$current/id" type="integer"/> |
---|
488 | <dbx:where field="owner_type" value="data category" type="string"/> |
---|
489 | <dbx:where field="name_type" value="data element name" type="string"/> |
---|
490 | <dbx:sort field="id"/> |
---|
491 | <dcif:dataElementNameSection isocat:id="{$current/id}" dcr:datcat="http://www.isocat.org/datcat/DC-2402"> |
---|
492 | <dcif:dataElementName dbx:field="name" dcr:datcat="http://www.isocat.org/datcat/DC-56"/> |
---|
493 | <dcif:source dbx:field="source" dcr:datcat="http://www.isocat.org/datcat/DC-27"/> |
---|
494 | </dcif:dataElementNameSection> |
---|
495 | </dbx:for-each> |
---|
496 | <dbx:for-each table="core_language_section" min="0" max="*"> |
---|
497 | <!-- the english language section is mandatory, but you can skip it in a object language view --> |
---|
498 | <dbx:where field="dc" select="$current/id"/> |
---|
499 | <dbx:where field="language" operator="in" select="$working-languages//id" type="integer" when="exists($working-languages//id)"/> |
---|
500 | <dcif:languageSection isocat:id="{$current/id}" dcr:datcat="http://www.isocat.org/datcat/DC-2412"> |
---|
501 | <dcif:language isocat:id="{$current/language}" isocat:direction="{$core_language//row[id=$current/language]/direction}" isocat:name="{$core_language//row[id=$current/language]/name}" dcr:datcat="http://www.isocat.org/datcat/DC-35"> |
---|
502 | <dbx:value-of select="$core_language//row[id=$current/language]/tag"/> |
---|
503 | </dcif:language> |
---|
504 | <dbx:for-each table="generic_name" min="0" max="*"> |
---|
505 | <dbx:where field="owner" select="$current/id" type="integer"/> |
---|
506 | <dbx:where field="owner_type" value="language section" type="string"/> |
---|
507 | <dbx:where field="name_type" value="name section" type="string"/> |
---|
508 | <dbx:sort field="status"/> |
---|
509 | <dbx:sort field="id"/> |
---|
510 | <dcif:nameSection isocat:id="{$current/id}" dcr:datcat="http://www.isocat.org/datcat/DC-50"> |
---|
511 | <dcif:name dbx:field="name" dcr:datcat="http://www.isocat.org/datcat/DC-11"> |
---|
512 | <dbx:for-each table="generic_name" min="1" max="1"> |
---|
513 | <dbx:where field="id" select="$current/id" type="integer"/> |
---|
514 | <dbx:sort field="id"/> |
---|
515 | <dbx:attribute name="xml:lang" select="$core_language//row[id=$current/language]/tag"/> |
---|
516 | <dbx:attribute name="isocat:direction" select="$core_language//row[id=$current/language]/direction"/> |
---|
517 | </dbx:for-each> |
---|
518 | </dcif:name> |
---|
519 | <dcif:nameStatus dbx:field="status" dcr:datcat="http://www.isocat.org/datcat/DC-12"> |
---|
520 | <dbx:choose> |
---|
521 | <dbx:when test="$current/status='standardized name'"> |
---|
522 | <dbx:attribute name="dcr:valueDatcat" value="http://www.isocat.org/datcat/DC-13"/> |
---|
523 | </dbx:when> |
---|
524 | <dbx:when test="$current/status='preferred name'"> |
---|
525 | <dbx:attribute name="dcr:valueDatcat" value="http://www.isocat.org/datcat/DC-14"/> |
---|
526 | </dbx:when> |
---|
527 | <dbx:when test="$current/status='admitted name'"> |
---|
528 | <dbx:attribute name="dcr:valueDatcat" value="http://www.isocat.org/datcat/DC-15"/> |
---|
529 | </dbx:when> |
---|
530 | <dbx:when test="$current/status='deprecated name'"> |
---|
531 | <dbx:attribute name="dcr:valueDatcat" value="http://www.isocat.org/datcat/DC-16"/> |
---|
532 | </dbx:when> |
---|
533 | <dbx:when test="$current/status='superseded name'"> |
---|
534 | <dbx:attribute name="dcr:valueDatcat" value="http://www.isocat.org/datcat/DC-17"/> |
---|
535 | </dbx:when> |
---|
536 | </dbx:choose> |
---|
537 | </dcif:nameStatus> |
---|
538 | </dcif:nameSection> |
---|
539 | </dbx:for-each> |
---|
540 | <dbx:for-each table="generic_text" min="0" max="*"> |
---|
541 | <dbx:where field="owner" select="$current/id" type="integer"/> |
---|
542 | <dbx:where field="owner_type" value="language section" type="string"/> |
---|
543 | <dbx:where field="text_type" value="definition" type="string"/> |
---|
544 | <dbx:sort field="id"/> |
---|
545 | <dcif:definitionSection isocat:id="{$current/id}" dcr:datcat="http://www.isocat.org/datcat/DC-2413"> |
---|
546 | <dcif:definition dbx:field="text" dcr:datcat="http://www.isocat.org/datcat/DC-32"> |
---|
547 | <dbx:attribute name="xml:lang" select="$core_language//row[id=$current/language]/tag"/> |
---|
548 | <dbx:attribute name="isocat:direction" select="$core_language//row[id=$current/language]/direction"/> |
---|
549 | </dcif:definition> |
---|
550 | <dcif:source dbx:field="source" dcr:datcat="http://www.isocat.org/datcat/DC-27"/> |
---|
551 | <dbx:for-each table="generic_text" min="0" max="1"> |
---|
552 | <dbx:where field="owner" select="$current/id" type="integer"/> |
---|
553 | <dbx:where field="owner_type" value="text" type="string"/> |
---|
554 | <dbx:where field="text_type" value="note" type="string"/> |
---|
555 | <dbx:sort field="id"/> |
---|
556 | <dcif:note isocat:id="{$current/id}" dbx:field="text" dcr:datcat="http://www.isocat.org/datcat/DC-36" dbx:when="normalize-space(.)!=''"> |
---|
557 | <dbx:attribute name="xml:lang" select="$core_language//row[id=$current/language]/tag"/> |
---|
558 | <dbx:attribute name="isocat:direction" select="$core_language//row[id=$current/language]/direction"/> |
---|
559 | </dcif:note> |
---|
560 | </dbx:for-each> |
---|
561 | </dcif:definitionSection> |
---|
562 | </dbx:for-each> |
---|
563 | <dbx:for-each table="generic_text" min="0" max="*"> |
---|
564 | <dbx:where field="owner" select="$current/id" type="integer"/> |
---|
565 | <dbx:where field="owner_type" value="language section" type="string"/> |
---|
566 | <dbx:where field="text_type" value="example" type="string"/> |
---|
567 | <dbx:sort field="id"/> |
---|
568 | <dcif:exampleSection isocat:id="{$current/id}" dcr:datcat="http://www.isocat.org/datcat/DC-2403"> |
---|
569 | <dcif:example dbx:field="text" dcr:datcat="http://www.isocat.org/datcat/DC-33"> |
---|
570 | <dbx:attribute name="xml:lang" select="$core_language//row[id=$current/language]/tag"/> |
---|
571 | <dbx:attribute name="isocat:direction" select="$core_language//row[id=$current/language]/direction"/> |
---|
572 | </dcif:example> |
---|
573 | <dcif:source dbx:field="source" dcr:datcat="http://www.isocat.org/datcat/DC-27" dbx:when="normalize-space(.)!=''"/> |
---|
574 | </dcif:exampleSection> |
---|
575 | </dbx:for-each> |
---|
576 | <dbx:for-each table="generic_text" min="0" max="*"> |
---|
577 | <dbx:where field="owner" select="$current/id" type="integer"/> |
---|
578 | <dbx:where field="owner_type" value="language section" type="string"/> |
---|
579 | <dbx:where field="text_type" value="explanation" type="string"/> |
---|
580 | <dbx:sort field="id"/> |
---|
581 | <dcif:explanationSection isocat:id="{$current/id}" dcr:datcat="http://www.isocat.org/datcat/DC-2404"> |
---|
582 | <dcif:explanation dbx:field="text" dcr:datcat="http://www.isocat.org/datcat/DC-34"> |
---|
583 | <dbx:attribute name="xml:lang" select="$core_language//row[id=$current/language]/tag"/> |
---|
584 | <dbx:attribute name="isocat:direction" select="$core_language//row[id=$current/language]/direction"/> |
---|
585 | </dcif:explanation> |
---|
586 | <dcif:source dbx:field="source" dcr:datcat="http://www.isocat.org/datcat/DC-27" dbx:when="normalize-space(.)!=''"/> |
---|
587 | </dcif:explanationSection> |
---|
588 | </dbx:for-each> |
---|
589 | <dbx:for-each table="generic_text" min="0" max="*"> |
---|
590 | <dbx:where field="owner" select="$current/id" type="integer"/> |
---|
591 | <dbx:where field="owner_type" value="language section" type="string"/> |
---|
592 | <dbx:where field="text_type" value="note" type="string"/> |
---|
593 | <dbx:sort field="id"/> |
---|
594 | <dcif:note isocat:id="{$current/id}" dbx:field="text" dcr:datcat="http://www.isocat.org/datcat/DC-36"> |
---|
595 | <dbx:attribute name="xml:lang" select="$core_language//row[id=$current/language]/tag"/> |
---|
596 | <dbx:attribute name="isocat:direction" select="$core_language//row[id=$current/language]/direction"/> |
---|
597 | </dcif:note> |
---|
598 | </dbx:for-each> |
---|
599 | </dcif:languageSection> |
---|
600 | </dbx:for-each> |
---|
601 | </dcif:descriptionSection> |
---|
602 | </dbx:when> |
---|
603 | </dbx:choose> |
---|
604 | <dbx:choose> |
---|
605 | <dbx:when test="$mode!='list'"> |
---|
606 | <dbx:choose> |
---|
607 | <dbx:when test="$current/type='open'"> |
---|
608 | <dbx:for-each table="link_open_data_category_conceptual_domain" min="1" max="1"> |
---|
609 | <dbx:where field="dc" select="$current/id"/> |
---|
610 | <dbx:for-each table="core_open_conceptual_domain" min="1" max="1"> |
---|
611 | <dbx:where field="id" select="$current/cd"/> |
---|
612 | <dcif:conceptualDomain isocat:id="{$current/id}" type="open" dcr:datcat="http://www.isocat.org/datcat/DC-4"> |
---|
613 | <dbx:for-each table="core_conceptual_domain" min="1" max="1"> |
---|
614 | <dbx:where field="id" select="$current/id"/> |
---|
615 | <dbx:for-each table="core_data_type" min="1" max="1"> |
---|
616 | <dbx:where field="id" select="$current/data_type"/> |
---|
617 | <dcif:dataType isocat:id="{$current/id}" dbx:field="data_type" dcr:datcat="http://www.isocat.org/datcat/DC-2397"/> |
---|
618 | </dbx:for-each> |
---|
619 | </dbx:for-each> |
---|
620 | </dcif:conceptualDomain> |
---|
621 | </dbx:for-each> |
---|
622 | </dbx:for-each> |
---|
623 | </dbx:when> |
---|
624 | <dbx:when test="$current/type='constrained'"> |
---|
625 | <dbx:for-each table="link_constrained_data_category_conceptual_domains" min="1" max="*"> |
---|
626 | <dbx:where field="dc" select="$current/id"/> |
---|
627 | <dbx:call-template name="constrained_conceptual_domain"/> |
---|
628 | </dbx:for-each> |
---|
629 | </dbx:when> |
---|
630 | <dbx:when test="$current/type='closed'"> |
---|
631 | <dbx:for-each table="link_closed_data_category_conceptual_domains" min="1" max="*"> |
---|
632 | <dbx:where field="dc" select="$current/id"/> |
---|
633 | <dbx:for-each table="core_profile_value_domain" min="1" max="1"> |
---|
634 | <dbx:where field="id" select="$current/cd"/> |
---|
635 | <dbx:where field="profile" operator="in" select="$profiles//id" when="exists($profiles//id)"/> |
---|
636 | <dcif:conceptualDomain isocat:id="{$current/id}" type="closed" dcr:datcat="http://www.isocat.org/datcat/DC-4"> |
---|
637 | <dbx:choose> |
---|
638 | <dbx:when test="($suppress='true') and ($suppress-context-type='profile') and ($current/profile!=$suppress-context)"> |
---|
639 | <dbx:attribute name="isocat:suppress" value="true"/> |
---|
640 | </dbx:when> |
---|
641 | </dbx:choose> |
---|
642 | <dbx:for-each table="core_conceptual_domain" min="1" max="1"> |
---|
643 | <dbx:where field="id" select="$current/id"/> |
---|
644 | <dbx:for-each table="core_data_type" min="1" max="1"> |
---|
645 | <dbx:where field="id" select="$current/data_type"/> |
---|
646 | <dcif:dataType isocat:id="{$current/id}" dbx:field="data_type" dcr:datcat="http://www.isocat.org/datcat/DC-2397"/> |
---|
647 | </dbx:for-each> |
---|
648 | </dbx:for-each> |
---|
649 | <dbx:for-each table="core_profile" min="1" max="1"> |
---|
650 | <dbx:where field="id" select="$current/profile"/> |
---|
651 | <dcif:profile isocat:id="{$current/id}" dbx:field="name" dcr:datcat="http://www.isocat.org/datcat/DC-37"/> |
---|
652 | </dbx:for-each> |
---|
653 | <dbx:for-each table="link_value_domain_values" min="1" max="*"> |
---|
654 | <dbx:where field="cd" select="$current/id"/> |
---|
655 | <dbx:call-template name="value"/> |
---|
656 | </dbx:for-each> |
---|
657 | </dcif:conceptualDomain> |
---|
658 | </dbx:for-each> |
---|
659 | </dbx:for-each> |
---|
660 | </dbx:when> |
---|
661 | </dbx:choose> |
---|
662 | <dbx:choose> |
---|
663 | <dbx:when test="$current/type='open' or $current/type='constrained'"> |
---|
664 | <dbx:for-each table="core_constrained_linguistic_section" min="0" max="*"> |
---|
665 | <dbx:where field="dc" select="$current/id"/> |
---|
666 | <dbx:for-each table="core_linguistic_section" min="1" max="1"> |
---|
667 | <dbx:where field="id" select="$current/id"/> |
---|
668 | <dbx:where field="language" operator="in" select="$object-languages//id" type="integer" when="exists($object-languages//id)"/> |
---|
669 | <dcif:linguisticSection isocat:id="{$current/id}" type="constrained" dcr:datcat="http://www.isocat.org/datcat/DC-2408"> |
---|
670 | <dbx:call-template name="linguistic_section-core"/> |
---|
671 | <dbx:for-each table="link_constrained_linguistic_section_conceptual_domains" min="0" max="*"> |
---|
672 | <dbx:where field="ls" select="$current/id"/> |
---|
673 | <dbx:call-template name="constrained_conceptual_domain"/> |
---|
674 | </dbx:for-each> |
---|
675 | </dcif:linguisticSection> |
---|
676 | </dbx:for-each> |
---|
677 | </dbx:for-each> |
---|
678 | </dbx:when> |
---|
679 | <dbx:when test="$current/type='closed'"> |
---|
680 | <dbx:for-each table="core_closed_linguistic_section" min="0" max="*"> |
---|
681 | <dbx:where field="dc" select="$current/id"/> |
---|
682 | <dbx:variable name="ol" when="exists($object-languages//id)" query=" |
---|
683 | SELECT |
---|
684 | language |
---|
685 | FROM |
---|
686 | core_linguistic_section |
---|
687 | WHERE |
---|
688 | id = {$current/id} |
---|
689 | ; |
---|
690 | "/> |
---|
691 | <dbx:variable name="ol" when="empty($object-languages//id)" select="()"/> |
---|
692 | <dcif:linguisticSection isocat:id="{$current/id}" type="closed" dcr:datcat="http://www.isocat.org/datcat/DC-2408" dbx:when="(empty($object-languages//id)) or (exists($object-languages//id[.=$ol//language]))"> |
---|
693 | <dbx:call-template name="linguistic_section-core"/> |
---|
694 | <dbx:for-each table="core_value_domain" min="0" max="1"> |
---|
695 | <dbx:where field="id" select="$current/cd" fallback="0"/> |
---|
696 | <dcif:conceptualDomain type="closed" isocat:id="{$current/id}" dcr:datcat="http://www.isocat.org/datcat/DC-4"> |
---|
697 | <dbx:for-each table="core_conceptual_domain" min="1" max="1"> |
---|
698 | <dbx:where field="id" select="$current/id"/> |
---|
699 | <dbx:for-each table="core_data_type" min="1" max="1"> |
---|
700 | <dbx:where field="id" select="$current/data_type"/> |
---|
701 | <dcif:dataType isocat:id="{$current/id}" dbx:field="data_type" dcr:datcat="http://www.isocat.org/datcat/DC-2397"/> |
---|
702 | </dbx:for-each> |
---|
703 | </dbx:for-each> |
---|
704 | <dbx:for-each table="link_value_domain_values" min="1" max="*"> |
---|
705 | <dbx:where field="cd" select="$current/id"/> |
---|
706 | <dbx:call-template name="value"/> |
---|
707 | </dbx:for-each> |
---|
708 | </dcif:conceptualDomain> |
---|
709 | </dbx:for-each> |
---|
710 | </dcif:linguisticSection> |
---|
711 | </dbx:for-each> |
---|
712 | </dbx:when> |
---|
713 | </dbx:choose> |
---|
714 | <dbx:choose> |
---|
715 | <dbx:when test="$current/type='simple'"> |
---|
716 | <dbx:for-each table="link_simple_data_category_super" min="0" max="1"> |
---|
717 | <!-- for now there can only be one super for a simple DC --> |
---|
718 | <dbx:where field="dc" select="$current/id"/> |
---|
719 | <dbx:for-each table="core_data_category" min="1" max="1"> |
---|
720 | <dbx:where field="id" select="$current/super"/> |
---|
721 | <dcif:isA dcr:datcat="http://www.isocat.org/datcat/DC-2409"> |
---|
722 | <dbx:call-template name="data_category-reference"/> |
---|
723 | </dcif:isA> |
---|
724 | </dbx:for-each> |
---|
725 | </dbx:for-each> |
---|
726 | </dbx:when> |
---|
727 | </dbx:choose> |
---|
728 | </dbx:when> |
---|
729 | </dbx:choose> |
---|
730 | </dcif:dataCategory> |
---|
731 | </dbx:cache> |
---|
732 | </dbx:for-each> |
---|
733 | </dbx:for-each> |
---|
734 | </dcif:dataCategorySelection> |
---|
735 | </dbx:process> |
---|
736 | |
---|
737 | <dbx:postprocess> |
---|
738 | <dbx:stylesheet template="identity"> |
---|
739 | <xsl:template match="dcif:profile"> |
---|
740 | <!-- only copy the first occurence of a profile --> |
---|
741 | <xsl:if test="empty(preceding-sibling::dcif:profile[@isocat:id=current()/@isocat:id])"> |
---|
742 | <xsl:copy> |
---|
743 | <xsl:apply-templates select="@* except @isocat:member"/> |
---|
744 | <xsl:if test="exists(parent::*/dcif:profile[@isocat:id=current()/@isocat:id][@isocat:member='true'])"> |
---|
745 | <xsl:attribute name="isocat:member" select="'true'"/> |
---|
746 | </xsl:if> |
---|
747 | <xsl:apply-templates select="node()"/> |
---|
748 | </xsl:copy> |
---|
749 | </xsl:if> |
---|
750 | </xsl:template> |
---|
751 | <xsl:template match="dcif:conceptualDomain[@type='closed']"> |
---|
752 | <!-- sort the values in a closed conceptual domain --> |
---|
753 | <xsl:copy> |
---|
754 | <xsl:apply-templates select="@*"/> |
---|
755 | <xsl:apply-templates select="node() except dcif:value"/> |
---|
756 | <xsl:apply-templates select="dcif:value"> |
---|
757 | <xsl:sort select="@isocat:name"/> |
---|
758 | </xsl:apply-templates> |
---|
759 | </xsl:copy> |
---|
760 | </xsl:template> |
---|
761 | <xsl:template match="dcif:descriptionSection"> |
---|
762 | <!-- sort the language sections --> |
---|
763 | <xsl:copy> |
---|
764 | <xsl:apply-templates select="@*"/> |
---|
765 | <xsl:apply-templates select="node() except dcif:languageSection"/> |
---|
766 | <!-- english first --> |
---|
767 | <xsl:apply-templates select="dcif:languageSection[dcif:language='en']"/> |
---|
768 | <!-- other languages in alfabetical order (on name or tag) --> |
---|
769 | <xsl:apply-templates select="dcif:languageSection[dcif:language!='en']"> |
---|
770 | <xsl:sort select="if (dcif:language/@isocat:name) then (dcif:language/@isocat:name) else (dcif:language)"/> |
---|
771 | </xsl:apply-templates> |
---|
772 | </xsl:copy> |
---|
773 | </xsl:template> |
---|
774 | <xsl:template match="dcif:dataCategory"> |
---|
775 | <!-- sort the linguistic sections --> |
---|
776 | <xsl:copy> |
---|
777 | <xsl:apply-templates select="@*"/> |
---|
778 | <xsl:comment> |
---|
779 | <xsl:text>This work by </xsl:text> |
---|
780 | <xsl:value-of select="@pid"/> |
---|
781 | <xsl:text> is licensed under a Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/).</xsl:text> |
---|
782 | </xsl:comment> |
---|
783 | <xsl:apply-templates select="node() except dcif:linguisticSection"/> |
---|
784 | <!-- other languages in alfabetical order (on name or tag) --> |
---|
785 | <xsl:apply-templates select="dcif:linguisticSection"> |
---|
786 | <xsl:sort select="if (dcif:language/@isocat:name) then (dcif:language/@isocat:name) else (dcif:language)"/> |
---|
787 | </xsl:apply-templates> |
---|
788 | </xsl:copy> |
---|
789 | </xsl:template> |
---|
790 | </dbx:stylesheet> |
---|
791 | </dbx:postprocess> |
---|
792 | |
---|
793 | </dbx:transform> |
---|