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