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