3 SPDX-FileCopyrightText: 2024, 2025 Lady <https://www.ladys.computer/about/#lady>
4 SPDX-License-Identifier: MPL-2.0
7 © 2024–2025 Lady [@ Ladys Computer].
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/>.
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'>
17 xmlns="http://www.w3.org/1999/XSL/Transform"
18 xmlns:Vocab="urn:fdc:vocab.ladys.computer:20240731:ns"
19 xmlns:Vocabvocab="urn:fdc:vocab.ladys.computer:20240731:vocab:"
20 xmlns:owl="http://www.w3.org/2002/07/owl#"
21 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
22 xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
23 xmlns:书社="urn:fdc:ladys.computer:20231231:Shu1She4"
24 exclude-result-prefixes="Vocab Vocabvocab"
27 <书社:id>urn:fdc:vocab.ladys.computer:20240731:transforms:render.xslt</书社:id>
28 <template name="Vocab:more-info">
29 <element name="span" namespace="&xhtml;">
31 <element name="span" namespace="&xhtml;">
32 <attribute name="aria-hidden">
35 <attribute name="style">
36 <text>text-decoration:none</text>
38 <attribute name="title">
39 <text>click to show rationale</text>
43 <element name="span" namespace="&xhtml;">
44 <attribute name="style">
45 <text>clip:rect(1px,1px,1px,1px);clip-path:inset(50%);height:1px;width:1px;margin:-1px;overflow:hidden;padding:0;position:absolute</text>
47 <text>rationale</text>
51 <template match="rdfs:Datatype" mode="Vocab:render-class">
52 <param name="root" select="/"/>
53 <param name="use-parens" select="false()"/>
55 <when test="@rdf:about">
56 <apply-templates select="@rdf:about" mode="Vocab:render-class">
57 <with-param name="root" select="$root"/>
60 <when test="owl:oneOf">
62 <!-- owl:oneOf is not really supported; lists of literals are difficult. -->
63 <apply-templates select="owl:oneOf[1]" mode="Vocab:render-value">
64 <with-param name="root" select="$root"/>
68 <when test="owl:complementOf">
69 <if test="$use-parens">
73 <apply-templates select="(owl:complimentOf/@rdf:resource|owl:complimentOf/*)[1]" mode="Vocab:render-class">
74 <with-param name="root" select="$root"/>
75 <with-param name="use-parens" select="true()"/>
77 <if test="$use-parens">
81 <when test="owl:intersectionOf">
82 <if test="$use-parens">
85 <for-each select="owl:intersectionOf/*">
86 <apply-templates select="." mode="Vocab:render-class">
87 <with-param name="root" select="$root"/>
88 <with-param name="use-parens" select="true()"/>
90 <if test="position()<last()">
94 <if test="$use-parens">
98 <when test="owl:unionOf">
99 <if test="$use-parens">
102 <for-each select="owl:unionOf/*">
103 <apply-templates select="." mode="Vocab:render-class">
104 <with-param name="root" select="$root"/>
105 <with-param name="use-parens" select="true()"/>
107 <if test="position()<last()">
111 <if test="$use-parens">
115 <when test="owl:withRestrictions">
116 <apply-templates select="(owl:onDatatype/@rdf:resource|owl:onDatatype/*)[1]" mode="Vocab:render-class">
117 <with-param name="root" select="$root"/>
118 <with-param name="use-parens" select="true()"/>
121 <for-each select="owl:withRestrictions/*/*">
122 <variable name="restriction-namespace" select="namespace-uri()"/>
123 <variable name="restriction-local-name" select="local-name()"/>
124 <for-each select="$root">
125 <call-template name="Vocab:link-to">
126 <with-param name="resource">
127 <value-of select="$restriction-namespace"/>
128 <value-of select="$restriction-local-name"/>
130 <with-param name="kind" select="'property'"/>
134 <apply-templates select="." mode="Vocab:render-value">
135 <with-param name="root" select="$root"/>
137 <if test="position()<last()">
147 <apply-templates select="Vocabvocab:inferred-from" mode="Vocab:render-class">
148 <with-param name="root" select="$root"/>
151 <template match="owl:Class" mode="Vocab:render-class">
152 <param name="root" select="/"/>
153 <param name="resource-context"/>
154 <param name="use-parens" select="false()"/>
156 <when test="@rdf:about">
157 <apply-templates select="@rdf:about" mode="Vocab:render-class">
158 <with-param name="root" select="$root"/>
159 <with-param name="resource-context" select="$resource-context"/>
162 <when test="owl:oneOf">
164 <for-each select="owl:oneOf/*">
165 <apply-templates select="." name="Vocab:render-individual">
166 <with-param name="root" select="$root"/>
167 <with-param name="resource-context" select="$resource-context"/>
169 <if test="position()<last()">
175 <when test="owl:complementOf">
176 <if test="$use-parens">
180 <apply-templates select="(owl:complementOf/@rdf:resource|owl:complementOf/*)[1]" mode="Vocab:render-class">
181 <with-param name="root" select="$root"/>
182 <with-param name="resource-context" select="$resource-context"/>
183 <with-param name="use-parens" select="true()"/>
185 <if test="$use-parens">
189 <when test="owl:intersectionOf">
190 <if test="$use-parens">
193 <for-each select="owl:intersectionOf/*">
194 <apply-templates select="." mode="Vocab:render-class">
195 <with-param name="root" select="$root"/>
196 <with-param name="resource-context" select="$resource-context"/>
197 <with-param name="use-parens" select="true()"/>
199 <if test="position()<last()">
203 <if test="$use-parens">
207 <when test="owl:unionOf">
208 <if test="$use-parens">
211 <for-each select="owl:unionOf/*">
212 <apply-templates select="." mode="Vocab:render-class">
213 <with-param name="root" select="$root"/>
214 <with-param name="resource-context" select="$resource-context"/>
215 <with-param name="use-parens" select="true()"/>
217 <if test="position()<last()">
221 <if test="$use-parens">
229 <apply-templates select="Vocabvocab:inferred-from" mode="Vocab:render-class">
230 <with-param name="root" select="$root"/>
231 <with-param name="resource-context" select="$resource-context"/>
234 <template match="owl:Restriction" mode="Vocab:render-class">
235 <param name="root" select="/"/>
236 <param name="resource-context"/>
237 <param name="use-parens" select="false()"/>
238 <variable name="property" select="(owl:onProperty/@rdf:resource|owl:onProperty/*)[1]"/>
239 <variable name="is-on-datatype-property" select="$property/self::owl:DatatypeProperty or not($property/self::*) and //rdf:RDF//owl:DatatypeProperty[@rdf:about=string($property) or owl:sameAs/@rdf:resource=string($property)]"/>
240 <if test="$use-parens">
243 <apply-templates select="$property" mode="Vocab:render-property">
244 <with-param name="root" select="$root"/>
245 <with-param name="resource-context" select="$resource-context"/>
248 <when test="owl:someValuesFrom">
250 <apply-templates select="(owl:someValuesFrom/@rdf:resource|owl:someValuesFrom/*)[1]" mode="Vocab:render-class">
251 <with-param name="root" select="$root"/>
252 <with-param name="resource-context" select="$resource-context"/>
253 <with-param name="use-parens" select="true()"/>
256 <when test="owl:allValuesFrom">
258 <apply-templates select="(owl:allValuesFrom/@rdf:resource|owl:allValuesFrom/*)[1]" mode="Vocab:render-class">
259 <with-param name="root" select="$root"/>
260 <with-param name="resource-context" select="$resource-context"/>
261 <with-param name="use-parens" select="true()"/>
264 <when test="owl:hasValue">
267 <when test="$is-on-datatype-property">
268 <apply-templates select="owl:hasValue[1]" mode="Vocab:render-value">
269 <with-param name="root" select="$root"/>
270 <with-param name="resource-context" select="$resource-context"/>
274 <apply-templates select="owl:hasValue/@rdf:resource" mode="Vocab:render-individual">
275 <with-param name="root" select="$root"/>
276 <with-param name="resource-context" select="$resource-context"/>
281 <when test="owl:hasSelf">
284 <when test="owl:minCardinality|owl:minQualifiedCardinality">
286 <value-of select="owl:minCardinality|owl:minQualifiedCardinality"/>
288 <when test="owl:maxCardinality|owl:maxQualifiedCardinality">
290 <value-of select="owl:maxCardinality|owl:maxQualifiedCardinality"/>
292 <when test="owl:cardinality|owl:qualifiedCardinality">
293 <text> exactly </text>
294 <value-of select="owl:cardinality|owl:qualifiedCardinality"/>
300 <if test="owl:onClass">
302 <apply-templates select="(owl:onClass/@rdf:resource|owl:onClass/*)[1]" mode="Vocab:render-class">
303 <with-param name="root" select="$root"/>
304 <with-param name="resource-context" select="$resource-context"/>
305 <with-param name="use-parens" select="true()"/>
308 <if test="owl:onDataRange">
310 <apply-templates select="(owl:onDataRange/@rdf:resource|owl:onDataRange/*)[1]" mode="Vocab:render-class">
311 <with-param name="root" select="$root"/>
312 <with-param name="resource-context" select="$resource-context"/>
313 <with-param name="use-parens" select="true()"/>
316 <if test="$use-parens">
319 <apply-templates select="Vocabvocab:inferred-from" mode="Vocab:render-class">
320 <with-param name="root" select="$root"/>
321 <with-param name="resource-context" select="$resource-context"/>
324 <template match="rdf:Description" mode="Vocab:render-class">
325 <param name="root" select="/"/>
326 <param name="resource-context"/>
328 <when test="@rdf:about">
329 <apply-templates select="@rdf:about" mode="Vocab:render-class">
330 <with-param name="root" select="$root"/>
331 <with-param name="resource-context" select="$resource-context"/>
338 <apply-templates select="Vocabvocab:inferred-from" mode="Vocab:render-class">
339 <with-param name="root" select="$root"/>
340 <with-param name="resource-context" select="$resource-context"/>
343 <template match="Vocabvocab:inferred-from" mode="Vocab:render-class">
344 <param name="root" select="/"/>
345 <param name="resource-context"/>
346 <if test="string($resource-context)='' or string(@rdf:resource)!=$resource-context">
348 <element name="details" namespace="&xhtml;">
349 <attribute name="class">
350 <text>inference</text>
352 <element name="summary" namespace="&xhtml;">
353 <call-template name="Vocab:more-info"/>
355 <element name="div" namespace="&xhtml;">
356 <element name="span" namespace="&xhtml;">
358 <text>implied by</text>
361 <apply-templates select="@rdf:resource" mode="Vocab:render-class">
362 <with-param name="root" select="$root"/>
368 <template match="@rdf:about|@rdf:resource" mode="Vocab:render-class">
369 <param name="root" select="/"/>
370 <variable name="resource" select="string()"/>
371 <for-each select="$root">
372 <call-template name="Vocab:link-to">
373 <with-param name="resource" select="$resource"/>
374 <with-param name="kind" select="'class'"/>
378 <template match="*" mode="Vocab:render-class">
381 <template match="rdf:Description" mode="Vocab:render-individual">
382 <param name="root" select="/"/>
383 <param name="resource-context"/>
385 <when test="@rdf:about">
386 <apply-templates select="@rdf:about" mode="Vocab:render-individual">
387 <with-param name="root" select="$root"/>
388 <with-param name="resource-context" select="$resource-context"/>
395 <apply-templates select="Vocabvocab:inferred-from" mode="Vocab:render-individual">
396 <with-param name="root" select="$root"/>
397 <with-param name="resource-context" select="$resource-context"/>
400 <template match="Vocabvocab:inferred-from" mode="Vocab:render-individual">
401 <param name="root" select="/"/>
402 <param name="resource-context"/>
403 <if test="string($resource-context)='' or string(@rdf:resource)!=$resource-context">
405 <element name="details" namespace="&xhtml;">
406 <attribute name="class">
407 <text>inference</text>
409 <element name="summary" namespace="&xhtml;">
410 <call-template name="Vocab:more-info"/>
412 <element name="div" namespace="&xhtml;">
413 <element name="span" namespace="&xhtml;">
415 <text>implied by</text>
418 <apply-templates select="@rdf:resource" mode="Vocab:render-individual">
419 <with-param name="root" select="$root"/>
425 <template match="@rdf:about|@rdf:resource" mode="Vocab:render-individual">
426 <param name="root" select="/"/>
427 <variable name="resource" select="string()"/>
428 <for-each select="$root">
429 <call-template name="Vocab:link-to">
430 <with-param name="resource" select="$resource"/>
431 <with-param name="kind" select="'individual'"/>
435 <template match="*" mode="Vocab:render-individual">
438 <template match="owl:AnnotationProperty|owl:DatatypeProperty|rdf:Description" mode="Vocab:render-property">
439 <param name="root" select="/"/>
440 <param name="resource-context"/>
442 <when test="@rdf:about">
443 <apply-templates select="@rdf:about" mode="Vocab:render-property">
444 <with-param name="root" select="$root"/>
445 <with-param name="resource-context" select="$resource-context"/>
452 <apply-templates select="Vocabvocab:inferred-from" mode="Vocab:render-property">
453 <with-param name="root" select="$root"/>
454 <with-param name="resource-context" select="$resource-context"/>
457 <template match="owl:ObjectProperty" mode="Vocab:render-property">
458 <param name="root" select="/"/>
459 <param name="resource-context"/>
461 <when test="@rdf:about">
462 <apply-templates select="@rdf:about" mode="Vocab:render-property">
463 <with-param name="root" select="$root"/>
464 <with-param name="resource-context" select="$resource-context"/>
467 <when test="owl:inverseOf">
468 <text>inverse </text>
469 <apply-templates select="(owl:inverseOf/@rdf:resource|owl:inverseOf/*)[1]" mode="Vocab:render-property">
470 <with-param name="root" select="$root"/>
471 <with-param name="resource-context" select="$resource-context"/>
478 <apply-templates select="Vocabvocab:inferred-from" mode="Vocab:render-property">
479 <with-param name="root" select="$root"/>
480 <with-param name="resource-context" select="$resource-context"/>
483 <template match="Vocabvocab:inferred-from" mode="Vocab:render-property">
484 <param name="root" select="/"/>
485 <param name="resource-context"/>
486 <if test="string($resource-context)='' or string(@rdf:resource)!=$resource-context">
488 <element name="details" namespace="&xhtml;">
489 <attribute name="class">
490 <text>inference</text>
492 <element name="summary" namespace="&xhtml;">
493 <call-template name="Vocab:more-info"/>
495 <element name="div" namespace="&xhtml;">
496 <element name="span" namespace="&xhtml;">
498 <text>implied by</text>
501 <apply-templates select="@rdf:resource" mode="Vocab:render-property">
502 <with-param name="root" select="$root"/>
508 <template match="@rdf:about|@rdf:resource" mode="Vocab:render-property">
509 <param name="root" select="/"/>
510 <variable name="resource" select="string()"/>
511 <for-each select="$root">
512 <call-template name="Vocab:link-to">
513 <with-param name="resource" select="$resource"/>
514 <with-param name="kind" select="'property'"/>
518 <template match="*" mode="Vocab:render-property">
521 <template match="*" mode="Vocab:render-value">
522 <param name="root" select="/"/>
523 <element name="code" namespace="&xhtml;">
525 <element name="span" namespace="&xhtml;">
526 <if test="string(@xml:lang)!=''">
527 <attribute name="lang">
528 <value-of select="@xml:lang"/>
530 <attribute name="xml:lang">
531 <value-of select="@xml:lang"/>
534 <value-of select="."/>
538 <when test="string(@xml:lang)!=''">
540 <value-of select="@xml:lang"/>
542 <when test="@rdf:datatype and string(@rdf:datatype)!='http://www.w3.org/2001/XMLSchema#string'">
544 <for-each select="/">
545 <call-template name="Vocab:link-to">
546 <with-param name="resource" select="@rdf:datatype"/>
547 <with-param name="kind" select="'class'"/>