]> Lady’s Gitweb - Vocab/blob - transforms/terms.xslt
Add some missing @lang="en" tags to H·T·M·L output
[Vocab] / transforms / terms.xslt
1 <?xml version="1.0"?>
2 <!--
3 SPDX-FileCopyrightText: 2024, 2025 Lady <https://www.ladys.computer/about/#lady>
4 SPDX-License-Identifier: MPL-2.0
5 -->
6 <!--
7 © 2024–2025 Lady [@ Ladys Computer].
8
9 This Source Code Form is subject to the terms of the Mozilla Public License, v 2.0.
10 If a copy of the M·P·L was not distributed with this file, You can obtain one at <https://mozilla.org/MPL/2.0/>.
11 -->
12 <!DOCTYPE transform [
13 <!ENTITY en '<attribute xmlns="http://www.w3.org/1999/XSL/Transform" name="lang"><text>en</text></attribute><attribute xmlns="http://www.w3.org/1999/XSL/Transform" name="xml:lang"><text>en</text></attribute>'>
14 <!ENTITY xhtml 'http://www.w3.org/1999/xhtml'>
15 ]>
16 <transform
17 xmlns="http://www.w3.org/1999/XSL/Transform"
18 xmlns:Vocab="urn:fdc:vocab.ladys.computer:20240731:ns"
19 xmlns:anno="http://www.w3.org/ns/oa#"
20 xmlns:html="http://www.w3.org/1999/xhtml"
21 xmlns:owl="http://www.w3.org/2002/07/owl#"
22 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
23 xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
24 xmlns:shacl="http://www.w3.org/ns/shacl#"
25 xmlns:skos="http://www.w3.org/2004/02/skos/core#"
26 xmlns:vocabstatus="http://www.w3.org/2003/06/sw-vocab-status/ns#"
27 xmlns:书社="urn:fdc:ladys.computer:20231231:Shu1She4"
28 exclude-result-prefixes="Vocab"
29 version="1.0"
30 >
31 <书社:id>urn:fdc:vocab.ladys.computer:20240731:transforms:terms.xslt</书社:id>
32 <key name="Vocab:named-class" match="owl:Class|rdfs:Datatype" use="@rdf:about"/>
33 <key name="Vocab:named-property" match="owl:AnnotationProperty|owl:DatatypeProperty|owl:ObjectProperty" use="@rdf:about"/>
34 <key name="Vocab:named-individual" match="owl:NamedIndividual" use="@rdf:about|owl:sameAs/@rdf:resource"/>
35 <key name="Vocab:subclass" match="owl:Class|owl:Restriction" use="rdfs:subClassOf/@rdf:resource"/>
36 <key name="Vocab:subproperty" match="owl:AnnotationProperty|owl:DatatypeProperty|owl:ObjectProperty" use="rdfs:subPropertyOf/@rdf:resource"/>
37 <template name="Vocab:link-to">
38 <param name="resource"/>
39 <param name="kind" select="'individual'"/>
40 <param name="full" select="true()"/>
41 <variable name="base-prefix">
42 <call-template name="Vocab:prefix">
43 <with-param name="unprefixed">
44 <call-template name="Vocab:base"/>
45 </with-param>
46 </call-template>
47 </variable>
48 <variable name="curie">
49 <call-template name="Vocab:prefix">
50 <with-param name="unprefixed" select="string($resource)"/>
51 </call-template>
52 </variable>
53 <variable name="localid">
54 <choose>
55 <when test="starts-with($curie, $base-prefix)">
56 <value-of select="substring-after($curie, $base-prefix)"/>
57 </when>
58 <otherwise>
59 <value-of select="$curie"/>
60 </otherwise>
61 </choose>
62 </variable>
63 <element name="a" namespace="&xhtml;">
64 <choose>
65 <when test="key(concat('Vocab:named-', $kind), $resource)">
66 <attribute name="data-curie">
67 <value-of select="$curie"/>
68 </attribute>
69 <attribute name="data-kind">
70 <value-of select="$kind"/>
71 </attribute>
72 <attribute name="href">
73 <choose>
74 <when test="$curie=string($resource)">
75 <value-of select="$resource"/>
76 </when>
77 <otherwise>
78 <text>/terms/</text>
79 <choose>
80 <when test="$kind='class'">
81 <text>classes/</text>
82 </when>
83 <when test="$kind='property'">
84 <text>properties/</text>
85 </when>
86 <otherwise>
87 <text>individuals/</text>
88 </otherwise>
89 </choose>
90 <value-of select="$localid"/>
91 <text>.xhtml</text>
92 </otherwise>
93 </choose>
94 </attribute>
95 <for-each select="key(concat('Vocab:named-', $kind), $resource)[1]">
96 <if test="not($full)">
97 <attribute name="title">
98 <value-of select="rdfs:label[1]"/>
99 <text>(</text>
100 <value-of select="$curie"/>
101 <text>)</text>
102 </attribute>
103 </if>
104 <variable name="wrappername">
105 <choose>
106 <when test="substring($localid, 1, 1)='(' and substring($localid, string-length($localid), 1)=')'">
107 <text>cite</text>
108 </when>
109 <otherwise>
110 <text>span</text>
111 </otherwise>
112 </choose>
113 </variable>
114 <element name="{$wrappername}" namespace="&xhtml;">
115 <attribute name="lang">
116 <value-of select="rdfs:label[1]/@xml:lang"/>
117 </attribute>
118 <attribute name="xml:lang">
119 <value-of select="rdfs:label[1]/@xml:lang"/>
120 </attribute>
121 <value-of select="rdfs:label[1]"/>
122 </element>
123 <if test="$full">
124 <text> </text>
125 <element name="small" namespace="&xhtml;">
126 <text>(</text>
127 <element name="code" namespace="&xhtml;">
128 <value-of select="$curie"/>
129 </element>
130 <text>)</text>
131 </element>
132 </if>
133 </for-each>
134 </when>
135 <otherwise>
136 <attribute name="href">
137 <value-of select="$resource"/>
138 </attribute>
139 <element name="code" namespace="&xhtml;">
140 <value-of select="$curie"/>
141 </element>
142 </otherwise>
143 </choose>
144 </element>
145 </template>
146 <template name="Vocab:list-all-terms">
147 <param name="source"/>
148 <call-template name="Vocab:list-terms">
149 <with-param name="source" select="$source"/>
150 <with-param name="selector" select="'Class'"/>
151 </call-template>
152 <call-template name="Vocab:list-terms">
153 <with-param name="source" select="$source"/>
154 <with-param name="selector" select="'Datatype'"/>
155 </call-template>
156 <call-template name="Vocab:list-terms">
157 <with-param name="source" select="$source"/>
158 <with-param name="selector" select="'AnnotationProperty'"/>
159 </call-template>
160 <call-template name="Vocab:list-terms">
161 <with-param name="source" select="$source"/>
162 <with-param name="selector" select="'ObjectProperty'"/>
163 </call-template>
164 <call-template name="Vocab:list-terms">
165 <with-param name="source" select="$source"/>
166 <with-param name="selector" select="'DatatypeProperty'"/>
167 </call-template>
168 <call-template name="Vocab:list-terms">
169 <with-param name="source" select="$source"/>
170 <with-param name="selector" select="'NamedIndividual'"/>
171 </call-template>
172 </template>
173 <template name="Vocab:list-terms">
174 <param name="source"/>
175 <param name="selector"/>
176 <variable name="base-iri">
177 <call-template name="Vocab:base"/>
178 </variable>
179 <variable name="selection" select="//rdf:RDF//*[@rdf:about and local-name()=$selector and ($selector='Datatype' and namespace-uri()='http://www.w3.org/2000/01/rdf-schema#' or $selector!='Datatype' and namespace-uri()='http://www.w3.org/2002/07/owl#') and rdfs:isDefinedBy[starts-with(@rdf:resource, $base-iri)] and ($source='' and starts-with(@rdf:about, $base-iri) or (rdfs:isDefinedBy|rdfs:isDefinedBy/anno:ResourceSelection/anno:hasSource)[@rdf:resource=$source])]"/>
180 <if test="$selection">
181 <element name="nav" namespace="&xhtml;">
182 <element name="h4" namespace="&xhtml;">
183 &en;
184 <choose>
185 <when test="$selector='Class'">
186 <text>Classes</text>
187 </when>
188 <when test="$selector='Datatype'">
189 <text>Datatypes</text>
190 </when>
191 <when test="$selector='AnnotationProperty'">
192 <text>Annotation Properties</text>
193 </when>
194 <when test="$selector='ObjectProperty'">
195 <text>Object Properties</text>
196 </when>
197 <when test="$selector='DatatypeProperty'">
198 <text>Data Properties</text>
199 </when>
200 <when test="$selector='NamedIndividual'">
201 <text>Named Individuals</text>
202 </when>
203 </choose>
204 </element>
205 <element name="ul" namespace="&xhtml;">
206 <for-each select="$selection">
207 <sort select="rdfs:label[1]" lang="en"/>
208 <element name="li" namespace="&xhtml;">
209 <call-template name="Vocab:link-to">
210 <with-param name="resource" select="string(@rdf:about)"/>
211 <with-param name="kind">
212 <choose>
213 <when test="$selector='Class' or $selector='Datatype'">
214 <text>class</text>
215 </when>
216 <when test="$selector='AnnotationProperty' or $selector='ObjectProperty' or $selector='DatatypeProperty'">
217 <text>property</text>
218 </when>
219 <otherwise>
220 <text>individual</text>
221 </otherwise>
222 </choose>
223 </with-param>
224 </call-template>
225 </element>
226 </for-each>
227 </element>
228 </element>
229 </if>
230 </template>
231 <template match="/书社:archive">
232 <variable name="base-iri">
233 <call-template name="Vocab:base"/>
234 </variable>
235 <copy>
236 <apply-templates select="@*"/>
237 <apply-templates select="*[@书社:archived-as]"/>
238 <for-each select="rdf:RDF//*[(self::owl:AnnotationProperty or self::owl:Class or self::owl:DatatypeProperty or self::owl:NamedIndividual or self::owl:ObjectProperty or self::rdfs:Datatype) and rdfs:isDefinedBy[starts-with(@rdf:resource, $base-iri)]]">
239 <element name="article" namespace="&xhtml;">
240 <attribute name="class">
241 <text>term</text>
242 </attribute>
243 <attribute name="书社:archived-as">
244 <value-of select="translate(substring-after(rdfs:isDefinedBy[starts-with(@rdf:resource, $base-iri)]/@rdf:resource, $base-iri), ':[]', '¦__')"/>
245 </attribute>
246 <element name="header" namespace="&xhtml;">
247 <element name="a" namespace="&xhtml;">
248 <attribute name="href">
249 <text>/</text>
250 </attribute>
251 <text>Ladys Vocabulary</text>
252 </element>
253 </element>
254 <apply-templates select="." mode="Vocab:render-term"/>
255 </element>
256 </for-each>
257 </copy>
258 </template>
259 <template match="html:article[rdf:RDF]">
260 <for-each select="rdf:RDF">
261 <for-each select="//owl:Ontology[1]">
262 <element name="hgroup" namespace="&xhtml;">
263 <element name="h1" namespace="&xhtml;">
264 <attribute name="lang">
265 <value-of select="rdfs:label[1]/@xml:lang"/>
266 </attribute>
267 <attribute name="xml:lang">
268 <value-of select="rdfs:label[1]/@xml:lang"/>
269 </attribute>
270 <value-of select="rdfs:label[1]"/>
271 </element>
272 <element name="p" namespace="&xhtml;">
273 &en;
274 <text>An ontology.</text>
275 </element>
276 </element>
277 <element name="div" namespace="&xhtml;">
278 <attribute name="class">
279 <text>owl</text>
280 </attribute>
281 <element name="dl" namespace="&xhtml;">
282 <element name="div" namespace="&xhtml;">
283 <element name="dt" namespace="&xhtml;">
284 <element name="abbr" namespace="&xhtml;">
285 &en;
286 <attribute name="title">
287 <text>Internationalized Resource Identifier</text>
288 </attribute>
289 <text>I·R·I</text>
290 </element>
291 </element>
292 <element name="dd" namespace="&xhtml;">
293 <element name="a" namespace="&xhtml;">
294 <attribute name="href">
295 <value-of select="@rdf:about"/>
296 </attribute>
297 <element name="code" namespace="&xhtml;">
298 <value-of select="@rdf:about"/>
299 </element>
300 </element>
301 </element>
302 </element>
303 </element>
304 </element>
305 <apply-templates select="rdfs:comment[1]/html:div" mode="Vocab:render-term"/>
306 <element name="section" namespace="&xhtml;">
307 <element name="h2" namespace="&xhtml;">
308 &en;
309 <text>List of Name·spaces</text>
310 </element>
311 <element name="table" namespace="&xhtml;">
312 <element name="thead" namespace="&xhtml;">
313 <element name="tr" namespace="&xhtml;">
314 <element name="th" namespace="&xhtml;">
315 &en;
316 <attribute name="scope">
317 <text>col</text>
318 </attribute>
319 Prefix
320 </element>
321 <element name="th" namespace="&xhtml;">
322 &en;
323 <attribute name="scope">
324 <text>col</text>
325 </attribute>
326 Name·space I·R·I
327 </element>
328 </element>
329 </element>
330 <element name="tbody" namespace="&xhtml;">
331 <for-each select="shacl:declare[shacl:prefix!='']">
332 <sort select="shacl:prefix"/>
333 <element name="tr" namespace="&xhtml;">
334 <element name="th" namespace="&xhtml;">
335 <attribute name="scope">
336 <text>row</text>
337 </attribute>
338 <element name="code" namespace="&xhtml;">
339 <value-of select="shacl:prefix"/>
340 <text>:</text>
341 </element>
342 </element>
343 <element name="td" namespace="&xhtml;">
344 <element name="code" namespace="&xhtml;">
345 <value-of select="shacl:namespace"/>
346 </element>
347 </element>
348 </element>
349 </for-each>
350 </element>
351 </element>
352 </element>
353 <element name="section" namespace="&xhtml;">
354 <element name="h2" namespace="&xhtml;">
355 &en;
356 <text>Terms Defined By </text>
357 <element name="cite" namespace="&xhtml;">
358 <attribute name="lang">
359 <value-of select="rdfs:label[1]/@xml:lang"/>
360 </attribute>
361 <attribute name="xml:lang">
362 <value-of select="rdfs:label[1]/@xml:lang"/>
363 </attribute>
364 <value-of select="rdfs:label[1]"/>
365 </element>
366 </element>
367 <call-template name="Vocab:list-all-terms"/>
368 </element>
369 </for-each>
370 <element name="section" namespace="&xhtml;">
371 <element name="h2" namespace="&xhtml;">
372 &en;
373 <text>Terms Defined Else·where</text>
374 </element>
375 <for-each select="//owl:NamedIndividual">
376 <sort select="rdfs:label" lang="en"/>
377 <if test="(//rdfs:isDefinedBy|//rdfs:isDefinedBy/anno:ResourceSelection/anno:hasSource)[string(@rdf:resource)=string(current()/@rdf:about)]">
378 <element name="section" namespace="&xhtml;">
379 <element name="h3" namespace="&xhtml;">
380 <element name="a" namespace="&xhtml;">
381 <attribute name="href">
382 <value-of select="@rdf:about"/>
383 </attribute>
384 <element name="cite" namespace="&xhtml;">
385 <attribute name="lang">
386 <value-of select="rdfs:label[1]/@xml:lang"/>
387 </attribute>
388 <attribute name="xml:lang">
389 <value-of select="rdfs:label[1]/@xml:lang"/>
390 </attribute>
391 <value-of select="rdfs:label[1]"/>
392 </element>
393 </element>
394 </element>
395 <apply-templates select="rdfs:comment[1]/html:div" mode="Vocab:render-term"/>
396 <call-template name="Vocab:list-all-terms">
397 <with-param name="source" select="@rdf:about"/>
398 </call-template>
399 </element>
400 </if>
401 </for-each>
402 </element>
403 </for-each>
404 </template>
405 <template match="*[@rdf:about and (self::owl:AnnotationProperty or self::owl:Class or self::owl:DatatypeProperty or self::owl:NamedIndividual or self::owl:ObjectProperty or self::rdfs:Datatype)]" mode="Vocab:render-term" priority="2">
406 <variable name="root" select="/"/>
407 <variable name="base-iri">
408 <call-template name="Vocab:base"/>
409 </variable>
410 <variable name="kind">
411 <choose>
412 <when test="self::owl:Class or self::rdfs:Datatype">
413 <text>class</text>
414 </when>
415 <when test="self::owl:AnnotationProperty or self::owl:ObjectProperty or self::owl:DatatypeProperty">
416 <text>property</text>
417 </when>
418 <otherwise>
419 <text>individual</text>
420 </otherwise>
421 </choose>
422 </variable>
423 <variable name="resource-context" select="string(@rdf:about)"/>
424 <variable name="equivalencies" select="Vocab:get-equivalents(., $kind)"/>
425 <variable name="supers" select="Vocab:get-transitives(., $kind, 'super')"/>
426 <variable name="inverses" select="Vocab:get-symmetrics(., $kind, 'inverse')"/>
427 <variable name="disjoints" select="Vocab:get-symmetrics(.|$supers, $kind, 'disjoint')"/>
428 <element name="meta" namespace="&xhtml;">
429 <attribute name="itemprop">
430 <text>urn:fdc:ladys.computer:20231231:Shu1She4:title</text>
431 </attribute>
432 <attribute name="content">
433 <value-of select="rdfs:label[1]"/>
434 <text> (</text>
435 <call-template name="Vocab:prefix">
436 <with-param name="unprefixed">
437 <value-of select="@rdf:about"/>
438 </with-param>
439 </call-template>
440 <text>)</text>
441 <text> | </text>
442 <value-of select="//rdf:RDF//owl:Ontology/rdfs:label"/>
443 </attribute>
444 </element>
445 <element name="hgroup" namespace="&xhtml;">
446 <element name="h1" namespace="&xhtml;">
447 <attribute name="lang">
448 <value-of select="rdfs:label[1]/@xml:lang"/>
449 </attribute>
450 <attribute name="xml:lang">
451 <value-of select="rdfs:label[1]/@xml:lang"/>
452 </attribute>
453 <value-of select="rdfs:label[1]"/>
454 </element>
455 <element name="p" namespace="&xhtml;">
456 <text>(</text>
457 <element name="code" namespace="&xhtml;">
458 <call-template name="Vocab:prefix">
459 <with-param name="unprefixed" select="@rdf:about"/>
460 </call-template>
461 </element>
462 <text>)</text>
463 </element>
464 <element name="p" namespace="&xhtml;">
465 &en;
466 <choose>
467 <when test="self::owl:Class">
468 <text>A class.</text>
469 </when>
470 <when test="self::rdfs:Datatype">
471 <text>A datatype.</text>
472 </when>
473 <when test="self::owl:AnnotationProperty">
474 <text>An annotation property.</text>
475 </when>
476 <when test="self::owl:ObjectProperty">
477 <text>An object property.</text>
478 </when>
479 <when test="self::owl:DatatypeProperty">
480 <text>A data property.</text>
481 </when>
482 <when test="self::owl:NamedIndividual">
483 <text>A named individual.</text>
484 </when>
485 </choose>
486 </element>
487 </element>
488 <element name="div" namespace="&xhtml;">
489 <attribute name="class">
490 <text>owl</text>
491 </attribute>
492 <if test="self::owl:DatatypeProperty|self::owl:ObjectProperty">
493 <element name="table" namespace="&xhtml;">
494 <element name="tbody" namespace="&xhtml;">
495 <element name="tr" namespace="&xhtml;">
496 <element name="td" namespace="&xhtml;">
497 <element name="label" namespace="&xhtml;">
498 &en;
499 <text>Functional? </text>
500 <element name="input" namespace="&xhtml;">
501 <attribute name="type">
502 <text>checkbox</text>
503 </attribute>
504 <attribute name="aria-readonly">
505 <text>true</text>
506 </attribute>
507 <attribute name="onclick">
508 <text>return false</text>
509 </attribute>
510 <if test="rdf:type/@rdf:resource[string()='http://www.w3.org/2002/07/owl#FunctionalProperty']">
511 <attribute name="checked">
512 <text>checked</text>
513 </attribute>
514 </if>
515 </element>
516 </element>
517 </element>
518 <if test="self::owl:ObjectProperty">
519 <element name="td" namespace="&xhtml;">
520 <element name="label" namespace="&xhtml;">
521 &en;
522 <text>Inverse Functional? </text>
523 <element name="input" namespace="&xhtml;">
524 <attribute name="type">
525 <text>checkbox</text>
526 </attribute>
527 <attribute name="aria-readonly">
528 <text>true</text>
529 </attribute>
530 <attribute name="onclick">
531 <text>return false</text>
532 </attribute>
533 <if test="rdf:type/@rdf:resource[string()='http://www.w3.org/2002/07/owl#InverseFunctionalProperty']">
534 <attribute name="checked">
535 <text>checked</text>
536 </attribute>
537 </if>
538 </element>
539 </element>
540 </element>
541 <element name="td" namespace="&xhtml;">
542 <element name="label" namespace="&xhtml;">
543 &en;
544 <text>Reflexive? </text>
545 <element name="input" namespace="&xhtml;">
546 <attribute name="type">
547 <text>checkbox</text>
548 </attribute>
549 <attribute name="aria-readonly">
550 <text>true</text>
551 </attribute>
552 <attribute name="onclick">
553 <text>return false</text>
554 </attribute>
555 <if test="rdf:type/@rdf:resource[string()='http://www.w3.org/2002/07/owl#ReflexiveProperty']">
556 <attribute name="checked">
557 <text>checked</text>
558 </attribute>
559 </if>
560 </element>
561 </element>
562 </element>
563 <element name="td" namespace="&xhtml;">
564 <element name="label" namespace="&xhtml;">
565 &en;
566 <text>Irreflexive? </text>
567 <element name="input" namespace="&xhtml;">
568 <attribute name="type">
569 <text>checkbox</text>
570 </attribute>
571 <attribute name="aria-readonly">
572 <text>true</text>
573 </attribute>
574 <attribute name="onclick">
575 <text>return false</text>
576 </attribute>
577 <if test="rdf:type/@rdf:resource[string()='http://www.w3.org/2002/07/owl#IrreflexiveProperty']">
578 <attribute name="checked">
579 <text>checked</text>
580 </attribute>
581 </if>
582 </element>
583 </element>
584 </element>
585 <element name="td" namespace="&xhtml;">
586 <element name="label" namespace="&xhtml;">
587 &en;
588 <text>Symmetric? </text>
589 <element name="input" namespace="&xhtml;">
590 <attribute name="type">
591 <text>checkbox</text>
592 </attribute>
593 <attribute name="aria-readonly">
594 <text>true</text>
595 </attribute>
596 <attribute name="onclick">
597 <text>return false</text>
598 </attribute>
599 <if test="rdf:type/@rdf:resource[string()='http://www.w3.org/2002/07/owl#SymmetricProperty']">
600 <attribute name="checked">
601 <text>checked</text>
602 </attribute>
603 </if>
604 </element>
605 </element>
606 </element>
607 <element name="td" namespace="&xhtml;">
608 <element name="label" namespace="&xhtml;">
609 &en;
610 <text>Asymmetric? </text>
611 <element name="input" namespace="&xhtml;">
612 <attribute name="type">
613 <text>checkbox</text>
614 </attribute>
615 <attribute name="aria-readonly">
616 <text>true</text>
617 </attribute>
618 <attribute name="onclick">
619 <text>return false</text>
620 </attribute>
621 <if test="rdf:type/@rdf:resource[string()='http://www.w3.org/2002/07/owl#AsymmetricProperty']">
622 <attribute name="checked">
623 <text>checked</text>
624 </attribute>
625 </if>
626 </element>
627 </element>
628 </element>
629 <element name="td" namespace="&xhtml;">
630 <element name="label" namespace="&xhtml;">
631 &en;
632 <text>Transitive? </text>
633 <element name="input" namespace="&xhtml;">
634 <attribute name="type">
635 <text>checkbox</text>
636 </attribute>
637 <attribute name="aria-readonly">
638 <text>true</text>
639 </attribute>
640 <attribute name="onclick">
641 <text>return false</text>
642 </attribute>
643 <if test="rdf:type/@rdf:resource[string()='http://www.w3.org/2002/07/owl#TransitiveProperty']">
644 <attribute name="checked">
645 <text>checked</text>
646 </attribute>
647 </if>
648 </element>
649 </element>
650 </element>
651 </if>
652 </element>
653 </element>
654 </element>
655 </if>
656 <element name="dl" namespace="&xhtml;">
657 <element name="div" namespace="&xhtml;">
658 <element name="dt" namespace="&xhtml;">
659 <element name="abbr" namespace="&xhtml;">
660 &en;
661 <attribute name="title">
662 <text>Internationalized Resource Identifier</text>
663 </attribute>
664 <text>I·R·I</text>
665 </element>
666 </element>
667 <element name="dd" namespace="&xhtml;">
668 <element name="a" namespace="&xhtml;">
669 <attribute name="href">
670 <value-of select="$resource-context"/>
671 </attribute>
672 <element name="code" namespace="&xhtml;">
673 <value-of select="$resource-context"/>
674 </element>
675 </element>
676 </element>
677 </element>
678 <if test="self::owl:NamedIndividual and rdf:type">
679 <element name="div" namespace="&xhtml;">
680 <element name="dt" namespace="&xhtml;">
681 &en;
682 <text>Type</text>
683 </element>
684 <for-each select="rdf:type">
685 <element name="dd" namespace="&xhtml;">
686 <apply-templates select="(@rdf:resource|*)[1]" mode="Vocab:render-class"/>
687 </element>
688 </for-each>
689 </element>
690 </if>
691 <if test="$equivalencies">
692 <element name="div" namespace="&xhtml;">
693 <choose>
694 <when test="self::rdfs:Datatype">
695 <element name="dt" namespace="&xhtml;">
696 &en;
697 <text>Equivalent Data Range</text>
698 </element>
699 <for-each select="$equivalencies">
700 <element name="dd" namespace="&xhtml;">
701 <apply-templates select="." mode="Vocab:render-class">
702 <with-param name="root" select="$root"/>
703 <with-param name="resource-context" select="$resource-context"/>
704 </apply-templates>
705 </element>
706 </for-each>
707 </when>
708 <when test="self::owl:Class">
709 <element name="dt" namespace="&xhtml;">
710 &en;
711 <text>Equivalent Class</text>
712 </element>
713 <for-each select="$equivalencies">
714 <element name="dd" namespace="&xhtml;">
715 <apply-templates select="." mode="Vocab:render-class">
716 <with-param name="root" select="$root"/>
717 <with-param name="resource-context" select="$resource-context"/>
718 </apply-templates>
719 </element>
720 </for-each>
721 </when>
722 <when test="$kind='property'">
723 <element name="dt" namespace="&xhtml;">
724 &en;
725 <text>Equivalent Property</text>
726 </element>
727 <for-each select="$equivalencies">
728 <element name="dd" namespace="&xhtml;">
729 <apply-templates select="." mode="Vocab:render-property">
730 <with-param name="root" select="$root"/>
731 <with-param name="resource-context" select="$resource-context"/>
732 </apply-templates>
733 </element>
734 </for-each>
735 </when>
736 <otherwise>
737 <element name="dt" namespace="&xhtml;">
738 &en;
739 <text>Same As</text>
740 </element>
741 <for-each select="$equivalencies">
742 <element name="dd" namespace="&xhtml;">
743 <apply-templates select="." mode="Vocab:render-individual">
744 <with-param name="root" select="$root"/>
745 <with-param name="resource-context" select="$resource-context"/>
746 </apply-templates>
747 </element>
748 </for-each>
749 </otherwise>
750 </choose>
751 </element>
752 </if>
753 <if test="$inverses">
754 <choose>
755 <when test="$kind='class'">
756 <element name="div" namespace="&xhtml;">
757 <element name="dt" namespace="&xhtml;">
758 &en;
759 <text>Complement Of</text>
760 </element>
761 <for-each select="$inverses">
762 <element name="dd" namespace="&xhtml;">
763 <apply-templates select="." mode="Vocab:render-class">
764 <with-param name="root" select="$root"/>
765 <with-param name="resource-context" select="$resource-context"/>
766 </apply-templates>
767 </element>
768 </for-each>
769 </element>
770 </when>
771 <when test="$kind='property'">
772 <element name="div" namespace="&xhtml;">
773 <element name="dt" namespace="&xhtml;">
774 &en;
775 <text>Inverse Of</text>
776 </element>
777 <for-each select="$inverses">
778 <element name="dd" namespace="&xhtml;">
779 <apply-templates select="." mode="Vocab:render-property">
780 <with-param name="root" select="$root"/>
781 <with-param name="resource-context" select="$resource-context"/>
782 </apply-templates>
783 </element>
784 </for-each>
785 </element>
786 </when>
787 </choose>
788 </if>
789 <if test="$supers">
790 <choose>
791 <when test="$kind='class'">
792 <element name="div" namespace="&xhtml;">
793 <element name="dt" namespace="&xhtml;">
794 &en;
795 <text>Subclass Of</text>
796 </element>
797 <for-each select="$supers">
798 <element name="dd" namespace="&xhtml;">
799 <apply-templates select="." mode="Vocab:render-class">
800 <with-param name="root" select="$root"/>
801 <with-param name="resource-context" select="$resource-context"/>
802 </apply-templates>
803 </element>
804 </for-each>
805 </element>
806 </when>
807 <when test="$kind='property'">
808 <element name="div" namespace="&xhtml;">
809 <element name="dt" namespace="&xhtml;">
810 &en;
811 <text>Subproperty Of</text>
812 </element>
813 <for-each select="$supers">
814 <element name="dd" namespace="&xhtml;">
815 <apply-templates select="." mode="Vocab:render-property">
816 <with-param name="root" select="$root"/>
817 <with-param name="resource-context" select="$resource-context"/>
818 </apply-templates>
819 </element>
820 </for-each>
821 </element>
822 </when>
823 </choose>
824 </if>
825 <if test="owl:hasKey">
826 <element name="div" namespace="&xhtml;">
827 <element name="dt" namespace="&xhtml;">
828 &en;
829 <text>Target For Key</text>
830 </element>
831 <for-each select="owl:hasKey">
832 <element name="dd" namespace="&xhtml;">
833 <for-each select="*">
834 <apply-templates select="." mode="Vocab:render-property"/>
835 <if test="position()&lt;last()">
836 <text>, </text>
837 </if>
838 </for-each>
839 </element>
840 </for-each>
841 </element>
842 </if>
843 <if test="owl:propertyChainAxiom">
844 <element name="div" namespace="&xhtml;">
845 <element name="dt" namespace="&xhtml;">
846 &en;
847 <text>Property Chain</text>
848 </element>
849 <for-each select="owl:propertyChainAxiom">
850 <element name="dd" namespace="&xhtml;">
851 <for-each select="*">
852 <apply-templates select="." mode="Vocab:render-property"/>
853 <if test="position()&lt;last()">
854 <text> o </text>
855 </if>
856 </for-each>
857 </element>
858 </for-each>
859 </element>
860 </if>
861 <if test="key('Vocab:subclass', @rdf:about)">
862 <element name="div" namespace="&xhtml;">
863 <element name="dt" namespace="&xhtml;">
864 &en;
865 <text>Superclass Of</text>
866 </element>
867 <for-each select="key('Vocab:subclass', @rdf:about)">
868 <element name="dd" namespace="&xhtml;">
869 <apply-templates select="." mode="Vocab:render-class"/>
870 </element>
871 </for-each>
872 </element>
873 </if>
874 <if test="key('Vocab:subproperty', @rdf:about)">
875 <element name="div" namespace="&xhtml;">
876 <element name="dt" namespace="&xhtml;">
877 &en;
878 <text>Superproperty Of</text>
879 </element>
880 <for-each select="key('Vocab:subproperty', @rdf:about)">
881 <element name="dd" namespace="&xhtml;">
882 <apply-templates select="." mode="Vocab:render-property"/>
883 </element>
884 </for-each>
885 </element>
886 </if>
887 <if test="rdfs:domain">
888 <element name="div" namespace="&xhtml;">
889 <element name="dt" namespace="&xhtml;">
890 &en;
891 <text>Domain</text>
892 </element>
893 <for-each select="rdfs:domain">
894 <element name="dd" namespace="&xhtml;">
895 <apply-templates select="(@rdf:resource|*)[1]" mode="Vocab:render-class"/>
896 </element>
897 </for-each>
898 </element>
899 </if>
900 <if test="rdfs:range">
901 <element name="div" namespace="&xhtml;">
902 <element name="dt" namespace="&xhtml;">
903 &en;
904 <text>Range</text>
905 </element>
906 <for-each select="rdfs:range">
907 <element name="dd" namespace="&xhtml;">
908 <apply-templates select="(@rdf:resource|*)[1]" mode="Vocab:render-class"/>
909 </element>
910 </for-each>
911 </element>
912 </if>
913 <if test="$disjoints">
914 <choose>
915 <when test="$kind='class'">
916 <element name="div" namespace="&xhtml;">
917 <element name="dt" namespace="&xhtml;">
918 &en;
919 <text>Disjoint With</text>
920 </element>
921 <for-each select="$disjoints">
922 <element name="dd" namespace="&xhtml;">
923 <apply-templates select="." mode="Vocab:render-class">
924 <with-param name="root" select="$root"/>
925 <with-param name="resource-context" select="$resource-context"/>
926 </apply-templates>
927 </element>
928 </for-each>
929 </element>
930 </when>
931 <when test="$kind='property'">
932 <element name="div" namespace="&xhtml;">
933 <element name="dt" namespace="&xhtml;">
934 &en;
935 <text>Property Disjoint With</text>
936 </element>
937 <for-each select="$disjoints">
938 <element name="dd" namespace="&xhtml;">
939 <apply-templates select="." mode="Vocab:render-property">
940 <with-param name="root" select="$root"/>
941 <with-param name="resource-context" select="$resource-context"/>
942 </apply-templates>
943 </element>
944 </for-each>
945 </element>
946 </when>
947 </choose>
948 </if>
949 <if test="skos:inScheme">
950 <element name="div" namespace="&xhtml;">
951 <element name="dt" namespace="&xhtml;">
952 &en;
953 <text>In Scheme</text>
954 </element>
955 <for-each select="skos:inScheme">
956 <element name="dd" namespace="&xhtml;">
957 <call-template name="Vocab:link-to">
958 <with-param name="resource" select="string(@rdf:resource)"/>
959 <with-param name="kind" select="'individual'"/>
960 </call-template>
961 </element>
962 </for-each>
963 </element>
964 </if>
965 <if test="rdfs:isDefinedBy[not(starts-with(@rdf:resource, $base-iri))]">
966 <element name="div" namespace="&xhtml;">
967 <element name="dt" namespace="&xhtml;">
968 &en;
969 <text>Is Defined By</text>
970 </element>
971 <for-each select="rdfs:isDefinedBy[not(starts-with(@rdf:resource, $base-iri))]">
972 <element name="dd" namespace="&xhtml;">
973 <choose>
974 <when test="@rdf:resource">
975 <call-template name="Vocab:link-to">
976 <with-param name="resource" select="string(@rdf:resource)"/>
977 <with-param name="kind" select="'individual'"/>
978 </call-template>
979 </when>
980 <when test="anno:ResourceSelection">
981 <variable name="base" select="string(anno:ResourceSelection/anno:hasSource/@rdf:resource)"/>
982 <element name="a" namespace="&xhtml;">
983 <attribute name="href">
984 <choose>
985 <when test="not(anno:ResourceSelection/anno:hasSelector/anno:FragmentSelector)">
986 <value-of select="$base"/>
987 </when>
988 <when test="contains($base, '#')">
989 <value-of select="substring-before($base, '#')"/>
990 </when>
991 <otherwise>
992 <value-of select="$base"/>
993 </otherwise>
994 </choose>
995 <if test="anno:ResourceSelection/anno:hasSelector/anno:FragmentSelector">
996 <text>#</text>
997 <value-of select="anno:ResourceSelection/anno:hasSelector/anno:FragmentSelector/rdf:value"/>
998 </if>
999 </attribute>
1000 <choose>
1001 <when test="key('Vocab:named-individual', $base)">
1002 <element name="cite" namespace="&xhtml;">
1003 <for-each select="key('Vocab:named-individual', $base)[1]">
1004 <attribute name="lang">
1005 <value-of select="rdfs:label[1]/@xml:lang"/>
1006 </attribute>
1007 <attribute name="xml:lang">
1008 <value-of select="rdfs:label[1]/@xml:lang"/>
1009 </attribute>
1010 <value-of select="rdfs:label[1]"/>
1011 </for-each>
1012 </element>
1013 </when>
1014 <otherwise>
1015 <element name="code" namespace="&xhtml;">
1016 <value-of select="$base"/>
1017 </element>
1018 </otherwise>
1019 </choose>
1020 <text> </text>
1021 <if test="anno:ResourceSelection/anno:hasSelector/anno:FragmentSelector">
1022 <element name="small" namespace="&xhtml;">
1023 <text>[</text>
1024 <element name="code" namespace="&xhtml;">
1025 <text>#</text>
1026 <value-of select="anno:ResourceSelection/anno:hasSelector/anno:FragmentSelector/rdf:value"/>
1027 </element>
1028 <text>]</text>
1029 </element>
1030 </if>
1031 </element>
1032 </when>
1033 <otherwise>
1034 <text>??</text>
1035 </otherwise>
1036 </choose>
1037 </element>
1038 </for-each>
1039 </element>
1040 </if>
1041 <if test="vocabstatus:term_status">
1042 <element name="div" namespace="&xhtml;">
1043 <element name="dt" namespace="&xhtml;">
1044 &en;
1045 <text>Status</text>
1046 </element>
1047 <for-each select="vocabstatus:term_status">
1048 <element name="dd" namespace="&xhtml;">
1049 <apply-templates select="." mode="Vocab:render-value"/>
1050 </element>
1051 </for-each>
1052 </element>
1053 </if>
1054 </element>
1055 </element>
1056 <apply-templates select="rdfs:comment[1]/html:div" mode="Vocab:render-term"/>
1057 <if test="self::owl:NamedIndividual and (//rdfs:isDefinedBy|//rdfs:isDefinedBy/anno:ResourceSelection/anno:hasSource)[string(@rdf:resource)=string(current()/@rdf:about)]">
1058 <call-template name="Vocab:list-all-terms">
1059 <with-param name="source" select="@rdf:about"/>
1060 </call-template>
1061 </if>
1062 </template>
1063 <template match="html:a[@data-curie[not(contains(., '/'))]]/@href" mode="Vocab:render-term" priority="2">
1064 <variable name="base-prefix">
1065 <call-template name="Vocab:prefix">
1066 <with-param name="unprefixed">
1067 <call-template name="Vocab:base"/>
1068 </with-param>
1069 </call-template>
1070 </variable>
1071 <attribute name="href">
1072 <text>/terms/</text>
1073 <choose>
1074 <when test="../@data-kind='class'">
1075 <text>classes/</text>
1076 </when>
1077 <when test="../@data-kind='property'">
1078 <text>properties/</text>
1079 </when>
1080 <otherwise>
1081 <text>individuals/</text>
1082 </otherwise>
1083 </choose>
1084 <choose>
1085 <when test="starts-with(../@data-curie, $base-prefix)">
1086 <value-of select="substring-after(../@data-curie, $base-prefix)"/>
1087 </when>
1088 <otherwise>
1089 <value-of name="identifier" select="../@data-curie"/>
1090 </otherwise>
1091 </choose>
1092 <text>.xhtml</text>
1093 </attribute>
1094 </template>
1095 <template match="@*|node()" mode="Vocab:render-term" priority="0">
1096 <copy>
1097 <apply-templates select="@*|node()" mode="Vocab:render-term"/>
1098 </copy>
1099 </template>
1100 </transform>
This page took 0.191237 seconds and 5 git commands to generate.