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