]> Lady’s Gitweb - Vocab/blob - transforms/terms.xslt
Fix some small rendering bugs
[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 <copy>
261 <copy-of select="@*"/>
262 <for-each select="rdf:RDF">
263 <for-each select="//owl:Ontology[1]">
264 <element name="meta" namespace="&xhtml;">
265 <attribute name="itemprop">
266 <text>urn:fdc:ladys.computer:20231231:Shu1She4:title</text>
267 </attribute>
268 <attribute name="lang">
269 <value-of select="rdfs:label[1]/@xml:lang"/>
270 </attribute>
271 <attribute name="xml:lang">
272 <value-of select="rdfs:label[1]/@xml:lang"/>
273 </attribute>
274 <attribute name="content">
275 <value-of select="//owl:Ontology[1]/rdfs:label[1]"/>
276 </attribute>
277 </element>
278 <element name="hgroup" namespace="&xhtml;">
279 <element name="h1" namespace="&xhtml;">
280 <attribute name="lang">
281 <value-of select="rdfs:label[1]/@xml:lang"/>
282 </attribute>
283 <attribute name="xml:lang">
284 <value-of select="rdfs:label[1]/@xml:lang"/>
285 </attribute>
286 <value-of select="rdfs:label[1]"/>
287 </element>
288 <element name="p" namespace="&xhtml;">
289 &en;
290 <text>An ontology.</text>
291 </element>
292 </element>
293 <element name="div" namespace="&xhtml;">
294 <attribute name="class">
295 <text>owl</text>
296 </attribute>
297 <element name="dl" namespace="&xhtml;">
298 <element name="div" namespace="&xhtml;">
299 <element name="dt" namespace="&xhtml;">
300 <element name="abbr" namespace="&xhtml;">
301 &en;
302 <attribute name="title">
303 <text>Internationalized Resource Identifier</text>
304 </attribute>
305 <text>I·R·I</text>
306 </element>
307 </element>
308 <element name="dd" namespace="&xhtml;">
309 <element name="a" namespace="&xhtml;">
310 <attribute name="href">
311 <value-of select="@rdf:about"/>
312 </attribute>
313 <element name="code" namespace="&xhtml;">
314 <value-of select="@rdf:about"/>
315 </element>
316 </element>
317 </element>
318 </element>
319 </element>
320 </element>
321 <apply-templates select="rdfs:comment[1]/html:div" mode="Vocab:render-term"/>
322 <element name="section" namespace="&xhtml;">
323 <element name="h2" namespace="&xhtml;">
324 &en;
325 <text>List of Name·spaces</text>
326 </element>
327 <element name="table" namespace="&xhtml;">
328 <element name="thead" namespace="&xhtml;">
329 <element name="tr" namespace="&xhtml;">
330 <element name="th" namespace="&xhtml;">
331 &en;
332 <attribute name="scope">
333 <text>col</text>
334 </attribute>
335 Prefix
336 </element>
337 <element name="th" namespace="&xhtml;">
338 &en;
339 <attribute name="scope">
340 <text>col</text>
341 </attribute>
342 Name·space I·R·I
343 </element>
344 </element>
345 </element>
346 <element name="tbody" namespace="&xhtml;">
347 <for-each select="shacl:declare[shacl:prefix!='']">
348 <sort select="shacl:prefix"/>
349 <element name="tr" namespace="&xhtml;">
350 <element name="th" namespace="&xhtml;">
351 <attribute name="scope">
352 <text>row</text>
353 </attribute>
354 <element name="code" namespace="&xhtml;">
355 <value-of select="shacl:prefix"/>
356 <text>:</text>
357 </element>
358 </element>
359 <element name="td" namespace="&xhtml;">
360 <element name="code" namespace="&xhtml;">
361 <value-of select="shacl:namespace"/>
362 </element>
363 </element>
364 </element>
365 </for-each>
366 </element>
367 </element>
368 </element>
369 <element name="section" namespace="&xhtml;">
370 <element name="h2" namespace="&xhtml;">
371 &en;
372 <text>Terms Defined By </text>
373 <element name="cite" namespace="&xhtml;">
374 <attribute name="lang">
375 <value-of select="rdfs:label[1]/@xml:lang"/>
376 </attribute>
377 <attribute name="xml:lang">
378 <value-of select="rdfs:label[1]/@xml:lang"/>
379 </attribute>
380 <value-of select="rdfs:label[1]"/>
381 </element>
382 </element>
383 <call-template name="Vocab:list-all-terms"/>
384 </element>
385 </for-each>
386 <element name="section" namespace="&xhtml;">
387 <element name="h2" namespace="&xhtml;">
388 &en;
389 <text>Terms Defined Else·where</text>
390 </element>
391 <for-each select="//owl:NamedIndividual">
392 <sort select="rdfs:label" lang="en"/>
393 <if test="(//rdfs:isDefinedBy|//rdfs:isDefinedBy/anno:ResourceSelection/anno:hasSource)[string(@rdf:resource)=string(current()/@rdf:about)]">
394 <element name="section" namespace="&xhtml;">
395 <element name="h3" namespace="&xhtml;">
396 <element name="a" namespace="&xhtml;">
397 <attribute name="href">
398 <value-of select="@rdf:about"/>
399 </attribute>
400 <element name="cite" namespace="&xhtml;">
401 <attribute name="lang">
402 <value-of select="rdfs:label[1]/@xml:lang"/>
403 </attribute>
404 <attribute name="xml:lang">
405 <value-of select="rdfs:label[1]/@xml:lang"/>
406 </attribute>
407 <value-of select="rdfs:label[1]"/>
408 </element>
409 </element>
410 </element>
411 <apply-templates select="rdfs:comment[1]/html:div" mode="Vocab:render-term"/>
412 <call-template name="Vocab:list-all-terms">
413 <with-param name="source" select="@rdf:about"/>
414 </call-template>
415 </element>
416 </if>
417 </for-each>
418 </element>
419 </for-each>
420 </copy>
421 </template>
422 <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">
423 <variable name="root" select="/"/>
424 <variable name="base-iri">
425 <call-template name="Vocab:base"/>
426 </variable>
427 <variable name="kind">
428 <choose>
429 <when test="self::owl:Class or self::rdfs:Datatype">
430 <text>class</text>
431 </when>
432 <when test="self::owl:AnnotationProperty or self::owl:ObjectProperty or self::owl:DatatypeProperty">
433 <text>property</text>
434 </when>
435 <otherwise>
436 <text>individual</text>
437 </otherwise>
438 </choose>
439 </variable>
440 <variable name="resource-context" select="string(@rdf:about)"/>
441 <variable name="equivalencies" select="Vocab:get-equivalents(., $kind)"/>
442 <variable name="supers" select="Vocab:get-transitives(., $kind, 'super')"/>
443 <variable name="inverses" select="Vocab:get-symmetrics(., $kind, 'inverse')"/>
444 <variable name="disjoints" select="Vocab:get-symmetrics(.|$supers, $kind, 'disjoint')"/>
445 <element name="meta" namespace="&xhtml;">
446 <attribute name="itemprop">
447 <text>urn:fdc:ladys.computer:20231231:Shu1She4:title</text>
448 </attribute>
449 <attribute name="content">
450 <value-of select="rdfs:label[1]"/>
451 <text> (</text>
452 <call-template name="Vocab:prefix">
453 <with-param name="unprefixed">
454 <value-of select="@rdf:about"/>
455 </with-param>
456 </call-template>
457 <text>)</text>
458 <text> | </text>
459 <value-of select="//rdf:RDF//owl:Ontology/rdfs:label"/>
460 </attribute>
461 </element>
462 <element name="hgroup" namespace="&xhtml;">
463 <element name="h1" namespace="&xhtml;">
464 <attribute name="lang">
465 <value-of select="rdfs:label[1]/@xml:lang"/>
466 </attribute>
467 <attribute name="xml:lang">
468 <value-of select="rdfs:label[1]/@xml:lang"/>
469 </attribute>
470 <value-of select="rdfs:label[1]"/>
471 </element>
472 <element name="p" namespace="&xhtml;">
473 <text>(</text>
474 <element name="code" namespace="&xhtml;">
475 <call-template name="Vocab:prefix">
476 <with-param name="unprefixed" select="@rdf:about"/>
477 </call-template>
478 </element>
479 <text>)</text>
480 </element>
481 <element name="p" namespace="&xhtml;">
482 &en;
483 <choose>
484 <when test="self::owl:Class">
485 <text>A class.</text>
486 </when>
487 <when test="self::rdfs:Datatype">
488 <text>A datatype.</text>
489 </when>
490 <when test="self::owl:AnnotationProperty">
491 <text>An annotation property.</text>
492 </when>
493 <when test="self::owl:ObjectProperty">
494 <text>An object property.</text>
495 </when>
496 <when test="self::owl:DatatypeProperty">
497 <text>A data property.</text>
498 </when>
499 <when test="self::owl:NamedIndividual">
500 <text>A named individual.</text>
501 </when>
502 </choose>
503 </element>
504 </element>
505 <element name="div" namespace="&xhtml;">
506 <attribute name="class">
507 <text>owl</text>
508 </attribute>
509 <if test="self::owl:DatatypeProperty|self::owl:ObjectProperty">
510 <element name="table" namespace="&xhtml;">
511 <element name="tbody" namespace="&xhtml;">
512 <element name="tr" namespace="&xhtml;">
513 <element name="td" namespace="&xhtml;">
514 <element name="label" namespace="&xhtml;">
515 &en;
516 <text>Functional? </text>
517 <element name="input" namespace="&xhtml;">
518 <attribute name="type">
519 <text>checkbox</text>
520 </attribute>
521 <attribute name="aria-readonly">
522 <text>true</text>
523 </attribute>
524 <attribute name="onclick">
525 <text>return false</text>
526 </attribute>
527 <if test="rdf:type/@rdf:resource[string()='http://www.w3.org/2002/07/owl#FunctionalProperty']">
528 <attribute name="checked">
529 <text>checked</text>
530 </attribute>
531 </if>
532 </element>
533 </element>
534 </element>
535 <if test="self::owl:ObjectProperty">
536 <element name="td" namespace="&xhtml;">
537 <element name="label" namespace="&xhtml;">
538 &en;
539 <text>Inverse Functional? </text>
540 <element name="input" namespace="&xhtml;">
541 <attribute name="type">
542 <text>checkbox</text>
543 </attribute>
544 <attribute name="aria-readonly">
545 <text>true</text>
546 </attribute>
547 <attribute name="onclick">
548 <text>return false</text>
549 </attribute>
550 <if test="rdf:type/@rdf:resource[string()='http://www.w3.org/2002/07/owl#InverseFunctionalProperty']">
551 <attribute name="checked">
552 <text>checked</text>
553 </attribute>
554 </if>
555 </element>
556 </element>
557 </element>
558 <element name="td" namespace="&xhtml;">
559 <element name="label" namespace="&xhtml;">
560 &en;
561 <text>Reflexive? </text>
562 <element name="input" namespace="&xhtml;">
563 <attribute name="type">
564 <text>checkbox</text>
565 </attribute>
566 <attribute name="aria-readonly">
567 <text>true</text>
568 </attribute>
569 <attribute name="onclick">
570 <text>return false</text>
571 </attribute>
572 <if test="rdf:type/@rdf:resource[string()='http://www.w3.org/2002/07/owl#ReflexiveProperty']">
573 <attribute name="checked">
574 <text>checked</text>
575 </attribute>
576 </if>
577 </element>
578 </element>
579 </element>
580 <element name="td" namespace="&xhtml;">
581 <element name="label" namespace="&xhtml;">
582 &en;
583 <text>Irreflexive? </text>
584 <element name="input" namespace="&xhtml;">
585 <attribute name="type">
586 <text>checkbox</text>
587 </attribute>
588 <attribute name="aria-readonly">
589 <text>true</text>
590 </attribute>
591 <attribute name="onclick">
592 <text>return false</text>
593 </attribute>
594 <if test="rdf:type/@rdf:resource[string()='http://www.w3.org/2002/07/owl#IrreflexiveProperty']">
595 <attribute name="checked">
596 <text>checked</text>
597 </attribute>
598 </if>
599 </element>
600 </element>
601 </element>
602 <element name="td" namespace="&xhtml;">
603 <element name="label" namespace="&xhtml;">
604 &en;
605 <text>Symmetric? </text>
606 <element name="input" namespace="&xhtml;">
607 <attribute name="type">
608 <text>checkbox</text>
609 </attribute>
610 <attribute name="aria-readonly">
611 <text>true</text>
612 </attribute>
613 <attribute name="onclick">
614 <text>return false</text>
615 </attribute>
616 <if test="rdf:type/@rdf:resource[string()='http://www.w3.org/2002/07/owl#SymmetricProperty']">
617 <attribute name="checked">
618 <text>checked</text>
619 </attribute>
620 </if>
621 </element>
622 </element>
623 </element>
624 <element name="td" namespace="&xhtml;">
625 <element name="label" namespace="&xhtml;">
626 &en;
627 <text>Asymmetric? </text>
628 <element name="input" namespace="&xhtml;">
629 <attribute name="type">
630 <text>checkbox</text>
631 </attribute>
632 <attribute name="aria-readonly">
633 <text>true</text>
634 </attribute>
635 <attribute name="onclick">
636 <text>return false</text>
637 </attribute>
638 <if test="rdf:type/@rdf:resource[string()='http://www.w3.org/2002/07/owl#AsymmetricProperty']">
639 <attribute name="checked">
640 <text>checked</text>
641 </attribute>
642 </if>
643 </element>
644 </element>
645 </element>
646 <element name="td" namespace="&xhtml;">
647 <element name="label" namespace="&xhtml;">
648 &en;
649 <text>Transitive? </text>
650 <element name="input" namespace="&xhtml;">
651 <attribute name="type">
652 <text>checkbox</text>
653 </attribute>
654 <attribute name="aria-readonly">
655 <text>true</text>
656 </attribute>
657 <attribute name="onclick">
658 <text>return false</text>
659 </attribute>
660 <if test="rdf:type/@rdf:resource[string()='http://www.w3.org/2002/07/owl#TransitiveProperty']">
661 <attribute name="checked">
662 <text>checked</text>
663 </attribute>
664 </if>
665 </element>
666 </element>
667 </element>
668 </if>
669 </element>
670 </element>
671 </element>
672 </if>
673 <element name="dl" namespace="&xhtml;">
674 <element name="div" namespace="&xhtml;">
675 <element name="dt" namespace="&xhtml;">
676 <element name="abbr" namespace="&xhtml;">
677 &en;
678 <attribute name="title">
679 <text>Internationalized Resource Identifier</text>
680 </attribute>
681 <text>I·R·I</text>
682 </element>
683 </element>
684 <element name="dd" namespace="&xhtml;">
685 <element name="a" namespace="&xhtml;">
686 <attribute name="href">
687 <value-of select="$resource-context"/>
688 </attribute>
689 <element name="code" namespace="&xhtml;">
690 <value-of select="$resource-context"/>
691 </element>
692 </element>
693 </element>
694 </element>
695 <if test="self::owl:NamedIndividual and rdf:type">
696 <element name="div" namespace="&xhtml;">
697 <element name="dt" namespace="&xhtml;">
698 &en;
699 <text>Type</text>
700 </element>
701 <for-each select="rdf:type">
702 <element name="dd" namespace="&xhtml;">
703 <apply-templates select="(@rdf:resource|*)[1]" mode="Vocab:render-class"/>
704 </element>
705 </for-each>
706 </element>
707 </if>
708 <if test="$equivalencies">
709 <element name="div" namespace="&xhtml;">
710 <choose>
711 <when test="self::rdfs:Datatype">
712 <element name="dt" namespace="&xhtml;">
713 &en;
714 <text>Equivalent Data Range</text>
715 </element>
716 <for-each select="$equivalencies">
717 <element name="dd" namespace="&xhtml;">
718 <apply-templates select="." mode="Vocab:render-class">
719 <with-param name="root" select="$root"/>
720 <with-param name="resource-context" select="$resource-context"/>
721 </apply-templates>
722 </element>
723 </for-each>
724 </when>
725 <when test="self::owl:Class">
726 <element name="dt" namespace="&xhtml;">
727 &en;
728 <text>Equivalent Class</text>
729 </element>
730 <for-each select="$equivalencies">
731 <element name="dd" namespace="&xhtml;">
732 <apply-templates select="." mode="Vocab:render-class">
733 <with-param name="root" select="$root"/>
734 <with-param name="resource-context" select="$resource-context"/>
735 </apply-templates>
736 </element>
737 </for-each>
738 </when>
739 <when test="$kind='property'">
740 <element name="dt" namespace="&xhtml;">
741 &en;
742 <text>Equivalent Property</text>
743 </element>
744 <for-each select="$equivalencies">
745 <element name="dd" namespace="&xhtml;">
746 <apply-templates select="." mode="Vocab:render-property">
747 <with-param name="root" select="$root"/>
748 <with-param name="resource-context" select="$resource-context"/>
749 </apply-templates>
750 </element>
751 </for-each>
752 </when>
753 <otherwise>
754 <element name="dt" namespace="&xhtml;">
755 &en;
756 <text>Same As</text>
757 </element>
758 <for-each select="$equivalencies">
759 <element name="dd" namespace="&xhtml;">
760 <apply-templates select="." mode="Vocab:render-individual">
761 <with-param name="root" select="$root"/>
762 <with-param name="resource-context" select="$resource-context"/>
763 </apply-templates>
764 </element>
765 </for-each>
766 </otherwise>
767 </choose>
768 </element>
769 </if>
770 <if test="owl:disjointUnionOf">
771 <element name="div" namespace="&xhtml;">
772 <element name="dt" namespace="&xhtml;">
773 &en;
774 <text>Disjoint Union Of</text>
775 </element>
776 <for-each select="owl:disjointUnionOf">
777 <element name="dd" namespace="&xhtml;">
778 <for-each select="*">
779 <apply-templates select="." mode="Vocab:render-class"/>
780 <if test="position()&lt;last()">
781 <text>, </text>
782 </if>
783 </for-each>
784 </element>
785 </for-each>
786 </element>
787 </if>
788 <if test="$inverses">
789 <choose>
790 <when test="$kind='class'">
791 <element name="div" namespace="&xhtml;">
792 <element name="dt" namespace="&xhtml;">
793 &en;
794 <text>Complement Of</text>
795 </element>
796 <for-each select="$inverses">
797 <element name="dd" namespace="&xhtml;">
798 <apply-templates select="." mode="Vocab:render-class">
799 <with-param name="root" select="$root"/>
800 <with-param name="resource-context" select="$resource-context"/>
801 </apply-templates>
802 </element>
803 </for-each>
804 </element>
805 </when>
806 <when test="$kind='property'">
807 <element name="div" namespace="&xhtml;">
808 <element name="dt" namespace="&xhtml;">
809 &en;
810 <text>Inverse Of</text>
811 </element>
812 <for-each select="$inverses">
813 <element name="dd" namespace="&xhtml;">
814 <apply-templates select="." mode="Vocab:render-property">
815 <with-param name="root" select="$root"/>
816 <with-param name="resource-context" select="$resource-context"/>
817 </apply-templates>
818 </element>
819 </for-each>
820 </element>
821 </when>
822 </choose>
823 </if>
824 <if test="$supers">
825 <choose>
826 <when test="$kind='class'">
827 <element name="div" namespace="&xhtml;">
828 <element name="dt" namespace="&xhtml;">
829 &en;
830 <text>Subclass Of</text>
831 </element>
832 <for-each select="$supers">
833 <element name="dd" namespace="&xhtml;">
834 <apply-templates select="." mode="Vocab:render-class">
835 <with-param name="root" select="$root"/>
836 <with-param name="resource-context" select="$resource-context"/>
837 </apply-templates>
838 </element>
839 </for-each>
840 </element>
841 </when>
842 <when test="$kind='property'">
843 <element name="div" namespace="&xhtml;">
844 <element name="dt" namespace="&xhtml;">
845 &en;
846 <text>Subproperty Of</text>
847 </element>
848 <for-each select="$supers">
849 <element name="dd" namespace="&xhtml;">
850 <apply-templates select="." mode="Vocab:render-property">
851 <with-param name="root" select="$root"/>
852 <with-param name="resource-context" select="$resource-context"/>
853 </apply-templates>
854 </element>
855 </for-each>
856 </element>
857 </when>
858 </choose>
859 </if>
860 <if test="owl:hasKey">
861 <element name="div" namespace="&xhtml;">
862 <element name="dt" namespace="&xhtml;">
863 &en;
864 <text>Target For Key</text>
865 </element>
866 <for-each select="owl:hasKey">
867 <element name="dd" namespace="&xhtml;">
868 <for-each select="*">
869 <apply-templates select="." mode="Vocab:render-property"/>
870 <if test="position()&lt;last()">
871 <text>, </text>
872 </if>
873 </for-each>
874 </element>
875 </for-each>
876 </element>
877 </if>
878 <if test="owl:propertyChainAxiom">
879 <element name="div" namespace="&xhtml;">
880 <element name="dt" namespace="&xhtml;">
881 &en;
882 <text>Property Chain</text>
883 </element>
884 <for-each select="owl:propertyChainAxiom">
885 <element name="dd" namespace="&xhtml;">
886 <for-each select="*">
887 <apply-templates select="." mode="Vocab:render-property"/>
888 <if test="position()&lt;last()">
889 <text> o </text>
890 </if>
891 </for-each>
892 </element>
893 </for-each>
894 </element>
895 </if>
896 <if test="key('Vocab:subclass', @rdf:about)">
897 <element name="div" namespace="&xhtml;">
898 <element name="dt" namespace="&xhtml;">
899 &en;
900 <text>Superclass Of</text>
901 </element>
902 <for-each select="key('Vocab:subclass', @rdf:about)">
903 <element name="dd" namespace="&xhtml;">
904 <apply-templates select="." mode="Vocab:render-class"/>
905 </element>
906 </for-each>
907 </element>
908 </if>
909 <if test="key('Vocab:subproperty', @rdf:about)">
910 <element name="div" namespace="&xhtml;">
911 <element name="dt" namespace="&xhtml;">
912 &en;
913 <text>Superproperty Of</text>
914 </element>
915 <for-each select="key('Vocab:subproperty', @rdf:about)">
916 <element name="dd" namespace="&xhtml;">
917 <apply-templates select="." mode="Vocab:render-property"/>
918 </element>
919 </for-each>
920 </element>
921 </if>
922 <if test="$disjoints">
923 <choose>
924 <when test="$kind='class'">
925 <element name="div" namespace="&xhtml;">
926 <element name="dt" namespace="&xhtml;">
927 &en;
928 <text>Disjoint With</text>
929 </element>
930 <for-each select="$disjoints">
931 <element name="dd" namespace="&xhtml;">
932 <apply-templates select="." mode="Vocab:render-class">
933 <with-param name="root" select="$root"/>
934 <with-param name="resource-context" select="$resource-context"/>
935 </apply-templates>
936 </element>
937 </for-each>
938 </element>
939 </when>
940 <when test="$kind='property'">
941 <element name="div" namespace="&xhtml;">
942 <element name="dt" namespace="&xhtml;">
943 &en;
944 <text>Property Disjoint With</text>
945 </element>
946 <for-each select="$disjoints">
947 <element name="dd" namespace="&xhtml;">
948 <apply-templates select="." mode="Vocab:render-property">
949 <with-param name="root" select="$root"/>
950 <with-param name="resource-context" select="$resource-context"/>
951 </apply-templates>
952 </element>
953 </for-each>
954 </element>
955 </when>
956 </choose>
957 </if>
958 <if test="rdfs:domain">
959 <element name="div" namespace="&xhtml;">
960 <element name="dt" namespace="&xhtml;">
961 &en;
962 <text>Domain</text>
963 </element>
964 <for-each select="rdfs:domain">
965 <element name="dd" namespace="&xhtml;">
966 <apply-templates select="(@rdf:resource|*)[1]" mode="Vocab:render-class"/>
967 </element>
968 </for-each>
969 </element>
970 </if>
971 <if test="rdfs:range">
972 <element name="div" namespace="&xhtml;">
973 <element name="dt" namespace="&xhtml;">
974 &en;
975 <text>Range</text>
976 </element>
977 <for-each select="rdfs:range">
978 <element name="dd" namespace="&xhtml;">
979 <apply-templates select="(@rdf:resource|*)[1]" mode="Vocab:render-class"/>
980 </element>
981 </for-each>
982 </element>
983 </if>
984 <if test="skos:inScheme">
985 <element name="div" namespace="&xhtml;">
986 <element name="dt" namespace="&xhtml;">
987 &en;
988 <text>In Scheme</text>
989 </element>
990 <for-each select="skos:inScheme">
991 <element name="dd" namespace="&xhtml;">
992 <call-template name="Vocab:link-to">
993 <with-param name="resource" select="string(@rdf:resource)"/>
994 <with-param name="kind" select="'individual'"/>
995 </call-template>
996 </element>
997 </for-each>
998 </element>
999 </if>
1000 <if test="skos:broader">
1001 <element name="div" namespace="&xhtml;">
1002 <element name="dt" namespace="&xhtml;">
1003 &en;
1004 <text>Has Broader</text>
1005 </element>
1006 <for-each select="skos:broader">
1007 <element name="dd" namespace="&xhtml;">
1008 <call-template name="Vocab:link-to">
1009 <with-param name="resource" select="string(@rdf:resource)"/>
1010 <with-param name="kind" select="'individual'"/>
1011 </call-template>
1012 </element>
1013 </for-each>
1014 </element>
1015 </if>
1016 <if test="skos:narrower">
1017 <element name="div" namespace="&xhtml;">
1018 <element name="dt" namespace="&xhtml;">
1019 &en;
1020 <text>Has Narrower</text>
1021 </element>
1022 <for-each select="skos:narrower">
1023 <element name="dd" namespace="&xhtml;">
1024 <call-template name="Vocab:link-to">
1025 <with-param name="resource" select="string(@rdf:resource)"/>
1026 <with-param name="kind" select="'individual'"/>
1027 </call-template>
1028 </element>
1029 </for-each>
1030 </element>
1031 </if>
1032 <if test="rdfs:isDefinedBy[not(starts-with(@rdf:resource, $base-iri))]">
1033 <element name="div" namespace="&xhtml;">
1034 <element name="dt" namespace="&xhtml;">
1035 &en;
1036 <text>Is Defined By</text>
1037 </element>
1038 <for-each select="rdfs:isDefinedBy[not(starts-with(@rdf:resource, $base-iri))]">
1039 <element name="dd" namespace="&xhtml;">
1040 <choose>
1041 <when test="@rdf:resource">
1042 <call-template name="Vocab:link-to">
1043 <with-param name="resource" select="string(@rdf:resource)"/>
1044 <with-param name="kind" select="'individual'"/>
1045 </call-template>
1046 </when>
1047 <when test="anno:ResourceSelection">
1048 <variable name="base" select="string(anno:ResourceSelection/anno:hasSource/@rdf:resource)"/>
1049 <element name="a" namespace="&xhtml;">
1050 <attribute name="href">
1051 <choose>
1052 <when test="not(anno:ResourceSelection/anno:hasSelector/anno:FragmentSelector)">
1053 <value-of select="$base"/>
1054 </when>
1055 <when test="contains($base, '#')">
1056 <value-of select="substring-before($base, '#')"/>
1057 </when>
1058 <otherwise>
1059 <value-of select="$base"/>
1060 </otherwise>
1061 </choose>
1062 <if test="anno:ResourceSelection/anno:hasSelector/anno:FragmentSelector">
1063 <text>#</text>
1064 <value-of select="anno:ResourceSelection/anno:hasSelector/anno:FragmentSelector/rdf:value"/>
1065 </if>
1066 </attribute>
1067 <choose>
1068 <when test="key('Vocab:named-individual', $base)">
1069 <element name="cite" namespace="&xhtml;">
1070 <for-each select="key('Vocab:named-individual', $base)[1]">
1071 <attribute name="lang">
1072 <value-of select="rdfs:label[1]/@xml:lang"/>
1073 </attribute>
1074 <attribute name="xml:lang">
1075 <value-of select="rdfs:label[1]/@xml:lang"/>
1076 </attribute>
1077 <value-of select="rdfs:label[1]"/>
1078 </for-each>
1079 </element>
1080 </when>
1081 <otherwise>
1082 <element name="code" namespace="&xhtml;">
1083 <value-of select="$base"/>
1084 </element>
1085 </otherwise>
1086 </choose>
1087 <text> </text>
1088 <if test="anno:ResourceSelection/anno:hasSelector/anno:FragmentSelector">
1089 <element name="small" namespace="&xhtml;">
1090 <text>[</text>
1091 <element name="code" namespace="&xhtml;">
1092 <text>#</text>
1093 <value-of select="anno:ResourceSelection/anno:hasSelector/anno:FragmentSelector/rdf:value"/>
1094 </element>
1095 <text>]</text>
1096 </element>
1097 </if>
1098 </element>
1099 </when>
1100 <otherwise>
1101 <text>??</text>
1102 </otherwise>
1103 </choose>
1104 </element>
1105 </for-each>
1106 </element>
1107 </if>
1108 <if test="vocabstatus:term_status">
1109 <element name="div" namespace="&xhtml;">
1110 <element name="dt" namespace="&xhtml;">
1111 &en;
1112 <text>Status</text>
1113 </element>
1114 <for-each select="vocabstatus:term_status">
1115 <element name="dd" namespace="&xhtml;">
1116 <apply-templates select="." mode="Vocab:render-value"/>
1117 </element>
1118 </for-each>
1119 </element>
1120 </if>
1121 </element>
1122 </element>
1123 <apply-templates select="rdfs:comment[1]/html:div" mode="Vocab:render-term"/>
1124 <if test="self::owl:NamedIndividual and (//rdfs:isDefinedBy|//rdfs:isDefinedBy/anno:ResourceSelection/anno:hasSource)[string(@rdf:resource)=string(current()/@rdf:about)]">
1125 <call-template name="Vocab:list-all-terms">
1126 <with-param name="source" select="@rdf:about"/>
1127 </call-template>
1128 </if>
1129 </template>
1130 <template match="html:a[@data-curie[not(contains(., '/'))]]/@href" mode="Vocab:render-term" priority="2">
1131 <variable name="base-prefix">
1132 <call-template name="Vocab:prefix">
1133 <with-param name="unprefixed">
1134 <call-template name="Vocab:base"/>
1135 </with-param>
1136 </call-template>
1137 </variable>
1138 <attribute name="href">
1139 <text>/terms/</text>
1140 <choose>
1141 <when test="../@data-kind='class'">
1142 <text>classes/</text>
1143 </when>
1144 <when test="../@data-kind='property'">
1145 <text>properties/</text>
1146 </when>
1147 <otherwise>
1148 <text>individuals/</text>
1149 </otherwise>
1150 </choose>
1151 <choose>
1152 <when test="starts-with(../@data-curie, $base-prefix)">
1153 <value-of select="substring-after(../@data-curie, $base-prefix)"/>
1154 </when>
1155 <otherwise>
1156 <value-of name="identifier" select="../@data-curie"/>
1157 </otherwise>
1158 </choose>
1159 <text>.xhtml</text>
1160 </attribute>
1161 </template>
1162 <template match="@*|node()" mode="Vocab:render-term" priority="0">
1163 <copy>
1164 <apply-templates select="@*|node()" mode="Vocab:render-term"/>
1165 </copy>
1166 </template>
1167 </transform>
This page took 0.124265 seconds and 5 git commands to generate.