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