+++ /dev/null
-<?xml version="1.0"?>
-<!--
-SPDX-FileCopyrightText: 2024 Lady <https://www.ladys.computer/about/#lady>
-SPDX-License-Identifier: MPL-2.0
--->
-<!--
-© 2024 Lady [@ Ladys Computer].
-
-This Source Code Form is subject to the terms of the Mozilla Public License, v 2.0.
-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/>.
--->
-<!DOCTYPE transform [
- <!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>'>
-]>
-<transform
- xmlns="http://www.w3.org/1999/XSL/Transform"
- xmlns:Vocab="urn:fdc:vocab.ladys.computer:20240731:ns"
- xmlns:Vocabvocab="urn:fdc:vocab.ladys.computer:20240731:vocab:"
- xmlns:anno="http://www.w3.org/ns/oa#"
- xmlns:html="http://www.w3.org/1999/xhtml"
- xmlns:owl="http://www.w3.org/2002/07/owl#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
- xmlns:shacl="http://www.w3.org/ns/shacl#"
- xmlns:skos="http://www.w3.org/2004/02/skos/core#"
- xmlns:vocabstatus="http://www.w3.org/2003/06/sw-vocab-status/ns#"
- xmlns:书社="urn:fdc:ladys.computer:20231231:Shu1She4"
- exclude-result-prefixes="Vocab Vocabvocab"
- version="1.0"
->
- <书社:id>urn:fdc:vocab.ladys.computer:20240731:transforms:site:terms.xslt</书社:id>
- <key name="Vocab:named-class" match="owl:Class|rdfs:Datatype" use="@rdf:about"/>
- <key name="Vocab:named-property" match="owl:AnnotationProperty|owl:DatatypeProperty|owl:ObjectProperty" use="@rdf:about"/>
- <key name="Vocab:named-individual" match="owl:NamedIndividual" use="@rdf:about|owl:sameAs/@rdf:resource"/>
- <key name="Vocab:subclass" match="owl:Class|owl:Restriction" use="rdfs:subClassOf/@rdf:resource"/>
- <key name="Vocab:subproperty" match="owl:AnnotationProperty|owl:DatatypeProperty|owl:ObjectProperty" use="rdfs:subPropertyOf/@rdf:resource"/>
- <template name="Vocab:base">
- <value-of select="//rdf:RDF//owl:Ontology/shacl:declare/shacl:namespace[preceding-sibling::shacl:prefix='']"/>
- </template>
- <template name="Vocab:link-to">
- <param name="resource"/>
- <param name="kind" select="'individual'"/>
- <param name="full" select="true()"/>
- <variable name="base-prefix">
- <call-template name="Vocab:prefix">
- <with-param name="unprefixed">
- <call-template name="Vocab:base"/>
- </with-param>
- </call-template>
- </variable>
- <variable name="curie">
- <call-template name="Vocab:prefix">
- <with-param name="unprefixed" select="string($resource)"/>
- </call-template>
- </variable>
- <variable name="localid">
- <choose>
- <when test="starts-with($curie, $base-prefix)">
- <value-of select="substring-after($curie, $base-prefix)"/>
- </when>
- <otherwise>
- <value-of select="$curie"/>
- </otherwise>
- </choose>
- </variable>
- <element name="html:a">
- <choose>
- <when test="key(concat('Vocab:named-', $kind), $resource)">
- <attribute name="data-curie">
- <value-of select="$curie"/>
- </attribute>
- <attribute name="data-kind">
- <value-of select="$kind"/>
- </attribute>
- <attribute name="href">
- <text>/terms/</text>
- <choose>
- <when test="$kind='class'">
- <text>classes/</text>
- </when>
- <when test="$kind='property'">
- <text>properties/</text>
- </when>
- <otherwise>
- <text>individuals/</text>
- </otherwise>
- </choose>
- <value-of select="$localid"/>
- <text>.xhtml</text>
- </attribute>
- <for-each select="key(concat('Vocab:named-', $kind), $resource)[1]">
- <if test="not($full)">
- <attribute name="title">
- <value-of select="rdfs:label[1]"/>
- <text>(</text>
- <value-of select="$curie"/>
- <text>)</text>
- </attribute>
- </if>
- <variable name="wrappername">
- <choose>
- <when test="substring($localid, 1, 1)='(' and substring($localid, string-length($localid), 1)=')'">
- <text>cite</text>
- </when>
- <otherwise>
- <text>span</text>
- </otherwise>
- </choose>
- </variable>
- <element name="html:{$wrappername}">
- <attribute name="lang">
- <value-of select="rdfs:label[1]/@xml:lang"/>
- </attribute>
- <attribute name="xml:lang">
- <value-of select="rdfs:label[1]/@xml:lang"/>
- </attribute>
- <value-of select="rdfs:label[1]"/>
- </element>
- <if test="$full">
- <text> </text>
- <element name="html:small">
- <text>(</text>
- <element name="html:code">
- <value-of select="$curie"/>
- </element>
- <text>)</text>
- </element>
- </if>
- </for-each>
- </when>
- <otherwise>
- <attribute name="href">
- <value-of select="$resource"/>
- </attribute>
- <element name="html:code">
- <value-of select="$curie"/>
- </element>
- </otherwise>
- </choose>
- </element>
- </template>
- <template name="Vocab:list-all-terms">
- <param name="source"/>
- <call-template name="Vocab:list-terms">
- <with-param name="source" select="$source"/>
- <with-param name="selector" select="'Class'"/>
- </call-template>
- <call-template name="Vocab:list-terms">
- <with-param name="source" select="$source"/>
- <with-param name="selector" select="'Datatype'"/>
- </call-template>
- <call-template name="Vocab:list-terms">
- <with-param name="source" select="$source"/>
- <with-param name="selector" select="'AnnotationProperty'"/>
- </call-template>
- <call-template name="Vocab:list-terms">
- <with-param name="source" select="$source"/>
- <with-param name="selector" select="'ObjectProperty'"/>
- </call-template>
- <call-template name="Vocab:list-terms">
- <with-param name="source" select="$source"/>
- <with-param name="selector" select="'DatatypeProperty'"/>
- </call-template>
- <call-template name="Vocab:list-terms">
- <with-param name="source" select="$source"/>
- <with-param name="selector" select="'NamedIndividual'"/>
- </call-template>
- </template>
- <template name="Vocab:list-terms">
- <param name="source"/>
- <param name="selector"/>
- <variable name="base-iri">
- <call-template name="Vocab:base"/>
- </variable>
- <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])]"/>
- <if test="$selection">
- <element name="html:nav">
- <element name="html:h4">
- &en;
- <choose>
- <when test="$selector='Class'">
- <text>Classes</text>
- </when>
- <when test="$selector='Datatype'">
- <text>Datatypes</text>
- </when>
- <when test="$selector='AnnotationProperty'">
- <text>Annotation Properties</text>
- </when>
- <when test="$selector='ObjectProperty'">
- <text>Object Properties</text>
- </when>
- <when test="$selector='DatatypeProperty'">
- <text>Data Properties</text>
- </when>
- <when test="$selector='NamedIndividual'">
- <text>Named Individuals</text>
- </when>
- </choose>
- </element>
- <element name="html:ul">
- <for-each select="$selection">
- <sort select="rdfs:label[1]" lang="en"/>
- <element name="html:li">
- <call-template name="Vocab:link-to">
- <with-param name="resource" select="string(@rdf:about)"/>
- <with-param name="kind">
- <choose>
- <when test="$selector='Class' or $selector='Datatype'">
- <text>class</text>
- </when>
- <when test="$selector='AnnotationProperty' or $selector='ObjectProperty' or $selector='DatatypeProperty'">
- <text>property</text>
- </when>
- <otherwise>
- <text>individual</text>
- </otherwise>
- </choose>
- </with-param>
- </call-template>
- </element>
- </for-each>
- </element>
- </element>
- </if>
- </template>
- <template name="Vocab:prefix">
- <param name="unprefixed" select="''"/>
- <variable name="namespace" select="//rdf:RDF//owl:Ontology/shacl:declare/shacl:namespace[starts-with($unprefixed, string()) and string(preceding-sibling::shacl:prefix)!=''][1]"/>
- <choose>
- <when test="not($namespace)">
- <value-of select="$unprefixed"/>
- </when>
- <otherwise>
- <value-of select="$namespace/preceding-sibling::shacl:prefix"/>
- <text>:</text>
- <value-of select="substring-after($unprefixed, $namespace)"/>
- </otherwise>
- </choose>
- </template>
- <template match="/书社:archive">
- <variable name="base-iri">
- <call-template name="Vocab:base"/>
- </variable>
- <copy>
- <apply-templates select="@*"/>
- <apply-templates select="*[@书社:archived-as]"/>
- <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)]]">
- <element name="html:article">
- <attribute name="class">
- <text>term</text>
- </attribute>
- <attribute name="书社:archived-as">
- <value-of select="translate(substring-after(rdfs:isDefinedBy[starts-with(@rdf:resource, $base-iri)]/@rdf:resource, $base-iri), ':[]', '¦__')"/>
- </attribute>
- <element name="html:header">
- <element name="html:a">
- <attribute name="href">
- <text>/</text>
- </attribute>
- <text>Ladys Vocabulary</text>
- </element>
- </element>
- <apply-templates select="." mode="Vocab:render-term"/>
- </element>
- </for-each>
- </copy>
- </template>
- <template match="html:article[rdf:RDF]">
- <for-each select="rdf:RDF">
- <for-each select="//owl:Ontology[1]">
- <element name="html:hgroup">
- <element name="html:h1">
- <attribute name="lang">
- <value-of select="rdfs:label[1]/@xml:lang"/>
- </attribute>
- <attribute name="xml:lang">
- <value-of select="rdfs:label[1]/@xml:lang"/>
- </attribute>
- <value-of select="rdfs:label[1]"/>
- </element>
- <element name="html:p">
- <text>An ontology.</text>
- </element>
- </element>
- <element name="html:div">
- <attribute name="class">
- <text>owl</text>
- </attribute>
- <element name="html:dl">
- <element name="html:div">
- <element name="html:dt">
- <element name="html:abbr">
- &en;
- <attribute name="title">
- <text>Internationalized Resource Identifier</text>
- </attribute>
- <text>I·R·I</text>
- </element>
- </element>
- <element name="html:dd">
- <element name="html:a">
- <attribute name="href">
- <value-of select="@rdf:about"/>
- </attribute>
- <element name="html:code">
- <value-of select="@rdf:about"/>
- </element>
- </element>
- </element>
- </element>
- </element>
- </element>
- <apply-templates select="rdfs:comment[1]/html:div" mode="Vocab:render-term"/>
- <element name="html:section">
- <element name="html:h2">
- &en;
- <text>List of Name·spaces</text>
- </element>
- <element name="html:table">
- <element name="html:thead">
- <element name="html:tr">
- <element name="html:th">
- &en;
- <attribute name="scope">
- <text>col</text>
- </attribute>
- Prefix
- </element>
- <element name="html:th">
- &en;
- <attribute name="scope">
- <text>col</text>
- </attribute>
- Name·space I·R·I
- </element>
- </element>
- </element>
- <element name="html:tbody">
- <for-each select="shacl:declare[shacl:prefix!='']">
- <sort select="shacl:prefix"/>
- <element name="html:tr">
- <element name="html:th">
- <attribute name="scope">
- <text>row</text>
- </attribute>
- <element name="html:code">
- <value-of select="shacl:prefix"/>
- <text>:</text>
- </element>
- </element>
- <element name="html:td">
- <element name="html:code">
- <value-of select="shacl:namespace"/>
- </element>
- </element>
- </element>
- </for-each>
- </element>
- </element>
- </element>
- <element name="html:section">
- <element name="html:h2">
- &en;
- <text>Terms Defined By </text>
- <element name="html:cite">
- <attribute name="lang">
- <value-of select="rdfs:label[1]/@xml:lang"/>
- </attribute>
- <attribute name="xml:lang">
- <value-of select="rdfs:label[1]/@xml:lang"/>
- </attribute>
- <value-of select="rdfs:label[1]"/>
- </element>
- </element>
- <call-template name="Vocab:list-all-terms"/>
- </element>
- </for-each>
- <element name="html:section">
- <element name="html:h2">
- &en;
- <text>Terms Defined Else·where</text>
- </element>
- <for-each select="//owl:NamedIndividual">
- <sort select="rdfs:label" lang="en"/>
- <if test="(//rdfs:isDefinedBy|//rdfs:isDefinedBy/anno:ResourceSelection/anno:hasSource)[string(@rdf:resource)=string(current()/@rdf:about)]">
- <element name="html:section">
- <element name="html:h3">
- <element name="html:a">
- <attribute name="href">
- <value-of select="@rdf:about"/>
- </attribute>
- <element name="html:cite">
- <attribute name="lang">
- <value-of select="rdfs:label[1]/@xml:lang"/>
- </attribute>
- <attribute name="xml:lang">
- <value-of select="rdfs:label[1]/@xml:lang"/>
- </attribute>
- <value-of select="rdfs:label[1]"/>
- </element>
- </element>
- </element>
- <apply-templates select="rdfs:comment[1]/html:div" mode="Vocab:render-term"/>
- <call-template name="Vocab:list-all-terms">
- <with-param name="source" select="@rdf:about"/>
- </call-template>
- </element>
- </if>
- </for-each>
- </element>
- </for-each>
- </template>
- <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">
- <variable name="root" select="/"/>
- <variable name="base-iri">
- <call-template name="Vocab:base"/>
- </variable>
- <variable name="kind">
- <choose>
- <when test="self::owl:Class or self::rdfs:Datatype">
- <text>class</text>
- </when>
- <when test="self::owl:AnnotationProperty or self::owl:ObjectProperty or self::owl:DatatypeProperty">
- <text>property</text>
- </when>
- <otherwise>
- <text>individual</text>
- </otherwise>
- </choose>
- </variable>
- <variable name="resource-context" select="string(@rdf:about)"/>
- <variable name="equivalencies" select="Vocab:get-equivalents(., $kind)"/>
- <variable name="supers" select="Vocab:get-transitives(., $kind, 'super')"/>
- <variable name="inverses" select="Vocab:get-symmetrics(., $kind, 'inverse')"/>
- <variable name="disjoints" select="Vocab:get-symmetrics(.|$supers, $kind, 'disjoint')"/>
- <element name="html:meta">
- <attribute name="itemprop">
- <text>urn:fdc:ladys.computer:20231231:Shu1She4:title</text>
- </attribute>
- <attribute name="content">
- <value-of select="rdfs:label[1]"/>
- <text> (</text>
- <call-template name="Vocab:prefix">
- <with-param name="unprefixed">
- <value-of select="@rdf:about"/>
- </with-param>
- </call-template>
- <text>)</text>
- <text> | </text>
- <value-of select="//rdf:RDF//owl:Ontology/rdfs:label"/>
- </attribute>
- </element>
- <element name="html:hgroup">
- <element name="html:h1">
- <attribute name="lang">
- <value-of select="rdfs:label[1]/@xml:lang"/>
- </attribute>
- <attribute name="xml:lang">
- <value-of select="rdfs:label[1]/@xml:lang"/>
- </attribute>
- <value-of select="rdfs:label[1]"/>
- </element>
- <element name="html:p">
- <text>(</text>
- <element name="html:code">
- <call-template name="Vocab:prefix">
- <with-param name="unprefixed" select="@rdf:about"/>
- </call-template>
- </element>
- <text>)</text>
- </element>
- <element name="html:p">
- <choose>
- <when test="self::owl:Class">
- <text>A class.</text>
- </when>
- <when test="self::rdfs:Datatype">
- <text>A datatype.</text>
- </when>
- <when test="self::owl:AnnotationProperty">
- <text>An annotation property.</text>
- </when>
- <when test="self::owl:ObjectProperty">
- <text>An object property.</text>
- </when>
- <when test="self::owl:DatatypeProperty">
- <text>A data property.</text>
- </when>
- <when test="self::owl:NamedIndividual">
- <text>A named individual.</text>
- </when>
- </choose>
- </element>
- </element>
- <element name="html:div">
- <attribute name="class">
- <text>owl</text>
- </attribute>
- <if test="self::owl:DatatypeProperty|self::owl:ObjectProperty">
- <element name="html:table">
- <element name="html:tbody">
- <element name="html:tr">
- <element name="html:td">
- <element name="html:label">
- &en;
- <text>Functional? </text>
- <element name="html:input">
- <attribute name="type">
- <text>checkbox</text>
- </attribute>
- <attribute name="aria-readonly">
- <text>true</text>
- </attribute>
- <attribute name="onclick">
- <text>return false</text>
- </attribute>
- <if test="rdf:type/@rdf:resource[string()='http://www.w3.org/2002/07/owl#FunctionalProperty']">
- <attribute name="checked">
- <text>checked</text>
- </attribute>
- </if>
- </element>
- </element>
- </element>
- <if test="self::owl:ObjectProperty">
- <element name="html:td">
- <element name="html:label">
- &en;
- <text>Inverse Functional? </text>
- <element name="html:input">
- <attribute name="type">
- <text>checkbox</text>
- </attribute>
- <attribute name="aria-readonly">
- <text>true</text>
- </attribute>
- <attribute name="onclick">
- <text>return false</text>
- </attribute>
- <if test="rdf:type/@rdf:resource[string()='http://www.w3.org/2002/07/owl#InverseFunctionalProperty']">
- <attribute name="checked">
- <text>checked</text>
- </attribute>
- </if>
- </element>
- </element>
- </element>
- <element name="html:td">
- <element name="html:label">
- &en;
- <text>Reflexive? </text>
- <element name="html:input">
- <attribute name="type">
- <text>checkbox</text>
- </attribute>
- <attribute name="aria-readonly">
- <text>true</text>
- </attribute>
- <attribute name="onclick">
- <text>return false</text>
- </attribute>
- <if test="rdf:type/@rdf:resource[string()='http://www.w3.org/2002/07/owl#ReflexiveProperty']">
- <attribute name="checked">
- <text>checked</text>
- </attribute>
- </if>
- </element>
- </element>
- </element>
- <element name="html:td">
- <element name="html:label">
- &en;
- <text>Irreflexive? </text>
- <element name="html:input">
- <attribute name="type">
- <text>checkbox</text>
- </attribute>
- <attribute name="aria-readonly">
- <text>true</text>
- </attribute>
- <attribute name="onclick">
- <text>return false</text>
- </attribute>
- <if test="rdf:type/@rdf:resource[string()='http://www.w3.org/2002/07/owl#IrreflexiveProperty']">
- <attribute name="checked">
- <text>checked</text>
- </attribute>
- </if>
- </element>
- </element>
- </element>
- <element name="html:td">
- <element name="html:label">
- &en;
- <text>Symmetric? </text>
- <element name="html:input">
- <attribute name="type">
- <text>checkbox</text>
- </attribute>
- <attribute name="aria-readonly">
- <text>true</text>
- </attribute>
- <attribute name="onclick">
- <text>return false</text>
- </attribute>
- <if test="rdf:type/@rdf:resource[string()='http://www.w3.org/2002/07/owl#SymmetricProperty']">
- <attribute name="checked">
- <text>checked</text>
- </attribute>
- </if>
- </element>
- </element>
- </element>
- <element name="html:td">
- <element name="html:label">
- &en;
- <text>Asymmetric? </text>
- <element name="html:input">
- <attribute name="type">
- <text>checkbox</text>
- </attribute>
- <attribute name="aria-readonly">
- <text>true</text>
- </attribute>
- <attribute name="onclick">
- <text>return false</text>
- </attribute>
- <if test="rdf:type/@rdf:resource[string()='http://www.w3.org/2002/07/owl#AsymmetricProperty']">
- <attribute name="checked">
- <text>checked</text>
- </attribute>
- </if>
- </element>
- </element>
- </element>
- <element name="html:td">
- <element name="html:label">
- &en;
- <text>Transitive? </text>
- <element name="html:input">
- <attribute name="type">
- <text>checkbox</text>
- </attribute>
- <attribute name="aria-readonly">
- <text>true</text>
- </attribute>
- <attribute name="onclick">
- <text>return false</text>
- </attribute>
- <if test="rdf:type/@rdf:resource[string()='http://www.w3.org/2002/07/owl#TransitiveProperty']">
- <attribute name="checked">
- <text>checked</text>
- </attribute>
- </if>
- </element>
- </element>
- </element>
- </if>
- </element>
- </element>
- </element>
- </if>
- <element name="html:dl">
- <element name="html:div">
- <element name="html:dt">
- <element name="html:abbr">
- &en;
- <attribute name="title">
- <text>Internationalized Resource Identifier</text>
- </attribute>
- <text>I·R·I</text>
- </element>
- </element>
- <element name="html:dd">
- <element name="html:a">
- <attribute name="href">
- <value-of select="$resource-context"/>
- </attribute>
- <element name="html:code">
- <value-of select="$resource-context"/>
- </element>
- </element>
- </element>
- </element>
- <if test="self::owl:NamedIndividual and rdf:type">
- <element name="html:div">
- <element name="html:dt">
- &en;
- <text>Type</text>
- </element>
- <for-each select="rdf:type">
- <element name="html:dd">
- <apply-templates select="(@rdf:resource|*)[1]" mode="Vocab:render-class"/>
- </element>
- </for-each>
- </element>
- </if>
- <if test="$equivalencies">
- <element name="html:div">
- <choose>
- <when test="self::rdfs:Datatype">
- <element name="html:dt">
- &en;
- <text>Equivalent Data Range</text>
- </element>
- <for-each select="$equivalencies">
- <element name="html:dd">
- <apply-templates select="." mode="Vocab:render-class">
- <with-param name="root" select="$root"/>
- <with-param name="resource-context" select="$resource-context"/>
- </apply-templates>
- </element>
- </for-each>
- </when>
- <when test="self::owl:Class">
- <element name="html:dt">
- &en;
- <text>Equivalent Class</text>
- </element>
- <for-each select="$equivalencies">
- <element name="html:dd">
- <apply-templates select="." mode="Vocab:render-class">
- <with-param name="root" select="$root"/>
- <with-param name="resource-context" select="$resource-context"/>
- </apply-templates>
- </element>
- </for-each>
- </when>
- <when test="$kind='property'">
- <element name="html:dt">
- &en;
- <text>Equivalent Property</text>
- </element>
- <for-each select="$equivalencies">
- <element name="html:dd">
- <apply-templates select="." mode="Vocab:render-property">
- <with-param name="root" select="$root"/>
- <with-param name="resource-context" select="$resource-context"/>
- </apply-templates>
- </element>
- </for-each>
- </when>
- <otherwise>
- <element name="html:dt">
- &en;
- <text>Same As</text>
- </element>
- <for-each select="$equivalencies">
- <element name="html:dd">
- <apply-templates select="." mode="Vocab:render-individual">
- <with-param name="root" select="$root"/>
- <with-param name="resource-context" select="$resource-context"/>
- </apply-templates>
- </element>
- </for-each>
- </otherwise>
- </choose>
- </element>
- </if>
- <if test="$inverses">
- <choose>
- <when test="$kind='class'">
- <element name="html:div">
- <element name="html:dt">
- &en;
- <text>Complement Of</text>
- </element>
- <for-each select="$inverses">
- <element name="html:dd">
- <apply-templates select="." mode="Vocab:render-class">
- <with-param name="root" select="$root"/>
- <with-param name="resource-context" select="$resource-context"/>
- </apply-templates>
- </element>
- </for-each>
- </element>
- </when>
- <when test="$kind='property'">
- <element name="html:div">
- <element name="html:dt">
- &en;
- <text>Inverse Of</text>
- </element>
- <for-each select="$inverses">
- <element name="html:dd">
- <apply-templates select="." mode="Vocab:render-property">
- <with-param name="root" select="$root"/>
- <with-param name="resource-context" select="$resource-context"/>
- </apply-templates>
- </element>
- </for-each>
- </element>
- </when>
- </choose>
- </if>
- <if test="$supers">
- <choose>
- <when test="$kind='class'">
- <element name="html:div">
- <element name="html:dt">
- &en;
- <text>Subclass Of</text>
- </element>
- <for-each select="$supers">
- <element name="html:dd">
- <apply-templates select="." mode="Vocab:render-class">
- <with-param name="root" select="$root"/>
- <with-param name="resource-context" select="$resource-context"/>
- </apply-templates>
- </element>
- </for-each>
- </element>
- </when>
- <when test="$kind='property'">
- <element name="html:div">
- <element name="html:dt">
- &en;
- <text>Subproperty Of</text>
- </element>
- <for-each select="$supers">
- <element name="html:dd">
- <apply-templates select="." mode="Vocab:render-property">
- <with-param name="root" select="$root"/>
- <with-param name="resource-context" select="$resource-context"/>
- </apply-templates>
- </element>
- </for-each>
- </element>
- </when>
- </choose>
- </if>
- <if test="owl:hasKey">
- <element name="html:div">
- <element name="html:dt">
- &en;
- <text>Target For Key</text>
- </element>
- <for-each select="owl:hasKey">
- <element name="html:dd">
- <for-each select="*">
- <apply-templates select="." mode="Vocab:render-property"/>
- <if test="position()<last()">
- <text>, </text>
- </if>
- </for-each>
- </element>
- </for-each>
- </element>
- </if>
- <if test="owl:propertyChainAxiom">
- <element name="html:div">
- <element name="html:dt">
- &en;
- <text>Property Chain</text>
- </element>
- <for-each select="owl:propertyChainAxiom">
- <element name="html:dd">
- <for-each select="*">
- <apply-templates select="." mode="Vocab:render-property"/>
- <if test="position()<last()">
- <text> o </text>
- </if>
- </for-each>
- </element>
- </for-each>
- </element>
- </if>
- <if test="key('Vocab:subclass', @rdf:about)">
- <element name="html:div">
- <element name="html:dt">
- &en;
- <text>Superclass Of</text>
- </element>
- <for-each select="key('Vocab:subclass', @rdf:about)">
- <element name="html:dd">
- <apply-templates select="." mode="Vocab:render-class"/>
- </element>
- </for-each>
- </element>
- </if>
- <if test="key('Vocab:subproperty', @rdf:about)">
- <element name="html:div">
- <element name="html:dt">
- &en;
- <text>Superproperty Of</text>
- </element>
- <for-each select="key('Vocab:subproperty', @rdf:about)">
- <element name="html:dd">
- <apply-templates select="." mode="Vocab:render-property"/>
- </element>
- </for-each>
- </element>
- </if>
- <if test="rdfs:domain">
- <element name="html:div">
- <element name="html:dt">
- &en;
- <text>Domain</text>
- </element>
- <for-each select="rdfs:domain">
- <element name="html:dd">
- <apply-templates select="(@rdf:resource|*)[1]" mode="Vocab:render-class"/>
- </element>
- </for-each>
- </element>
- </if>
- <if test="rdfs:range">
- <element name="html:div">
- <element name="html:dt">
- &en;
- <text>Range</text>
- </element>
- <for-each select="rdfs:range">
- <element name="html:dd">
- <apply-templates select="(@rdf:resource|*)[1]" mode="Vocab:render-class"/>
- </element>
- </for-each>
- </element>
- </if>
- <if test="$disjoints">
- <choose>
- <when test="$kind='class'">
- <element name="html:div">
- <element name="html:dt">
- &en;
- <text>Disjoint With</text>
- </element>
- <for-each select="$disjoints">
- <element name="html:dd">
- <apply-templates select="." mode="Vocab:render-class">
- <with-param name="root" select="$root"/>
- <with-param name="resource-context" select="$resource-context"/>
- </apply-templates>
- </element>
- </for-each>
- </element>
- </when>
- <when test="$kind='property'">
- <element name="html:div">
- <element name="html:dt">
- &en;
- <text>Property Disjoint With</text>
- </element>
- <for-each select="$disjoints">
- <element name="html:dd">
- <apply-templates select="." mode="Vocab:render-property">
- <with-param name="root" select="$root"/>
- <with-param name="resource-context" select="$resource-context"/>
- </apply-templates>
- </element>
- </for-each>
- </element>
- </when>
- </choose>
- </if>
- <if test="skos:inScheme">
- <element name="html:div">
- <element name="html:dt">
- &en;
- <text>In Scheme</text>
- </element>
- <for-each select="skos:inScheme">
- <element name="html:dd">
- <call-template name="Vocab:link-to">
- <with-param name="resource" select="string(@rdf:resource)"/>
- <with-param name="kind" select="'individual'"/>
- </call-template>
- </element>
- </for-each>
- </element>
- </if>
- <if test="rdfs:isDefinedBy[not(starts-with(@rdf:resource, $base-iri))]">
- <element name="html:div">
- <element name="html:dt">
- &en;
- <text>Is Defined By</text>
- </element>
- <for-each select="rdfs:isDefinedBy[not(starts-with(@rdf:resource, $base-iri))]">
- <element name="html:dd">
- <choose>
- <when test="@rdf:resource">
- <call-template name="Vocab:link-to">
- <with-param name="resource" select="string(@rdf:resource)"/>
- <with-param name="kind" select="'individual'"/>
- </call-template>
- </when>
- <when test="anno:ResourceSelection">
- <variable name="base" select="string(anno:ResourceSelection/anno:hasSource/@rdf:resource)"/>
- <element name="html:a">
- <attribute name="href">
- <choose>
- <when test="not(anno:ResourceSelection/anno:hasSelector/anno:FragmentSelector)">
- <value-of select="$base"/>
- </when>
- <when test="contains($base, '#')">
- <value-of select="substring-before($base, '#')"/>
- </when>
- <otherwise>
- <value-of select="$base"/>
- </otherwise>
- </choose>
- <if test="anno:ResourceSelection/anno:hasSelector/anno:FragmentSelector">
- <text>#</text>
- <value-of select="anno:ResourceSelection/anno:hasSelector/anno:FragmentSelector/rdf:value"/>
- </if>
- </attribute>
- <choose>
- <when test="key('Vocab:named-individual', $base)">
- <element name="html:cite">
- <for-each select="key('Vocab:named-individual', $base)[1]">
- <attribute name="lang">
- <value-of select="rdfs:label[1]/@xml:lang"/>
- </attribute>
- <attribute name="xml:lang">
- <value-of select="rdfs:label[1]/@xml:lang"/>
- </attribute>
- <value-of select="rdfs:label[1]"/>
- </for-each>
- </element>
- </when>
- <otherwise>
- <element name="html:code">
- <value-of select="$base"/>
- </element>
- </otherwise>
- </choose>
- <text> </text>
- <if test="anno:ResourceSelection/anno:hasSelector/anno:FragmentSelector">
- <element name="html:small">
- <text>[</text>
- <element name="html:code">
- <text>#</text>
- <value-of select="anno:ResourceSelection/anno:hasSelector/anno:FragmentSelector/rdf:value"/>
- </element>
- <text>]</text>
- </element>
- </if>
- </element>
- </when>
- <otherwise>
- <text>??</text>
- </otherwise>
- </choose>
- </element>
- </for-each>
- </element>
- </if>
- <if test="vocabstatus:term_status">
- <element name="html:div">
- <element name="html:dt">
- &en;
- <text>Status</text>
- </element>
- <for-each select="vocabstatus:term_status">
- <element name="html:dd">
- <apply-templates select="." mode="Vocab:render-value"/>
- </element>
- </for-each>
- </element>
- </if>
- </element>
- </element>
- <apply-templates select="rdfs:comment[1]/html:div" mode="Vocab:render-term"/>
- <if test="self::owl:NamedIndividual and (//rdfs:isDefinedBy|//rdfs:isDefinedBy/anno:ResourceSelection/anno:hasSource)[string(@rdf:resource)=string(current()/@rdf:about)]">
- <call-template name="Vocab:list-all-terms">
- <with-param name="source" select="@rdf:about"/>
- </call-template>
- </if>
- </template>
- <template match="html:a[@data-curie[not(contains(., '/'))]]/@href" mode="Vocab:render-term" priority="2">
- <variable name="base-prefix">
- <call-template name="Vocab:prefix">
- <with-param name="unprefixed">
- <call-template name="Vocab:base"/>
- </with-param>
- </call-template>
- </variable>
- <attribute name="href">
- <text>/terms/</text>
- <choose>
- <when test="../@data-kind='class'">
- <text>classes/</text>
- </when>
- <when test="../@data-kind='property'">
- <text>properties/</text>
- </when>
- <otherwise>
- <text>individuals/</text>
- </otherwise>
- </choose>
- <choose>
- <when test="starts-with(../@data-curie, $base-prefix)">
- <value-of select="substring-after(../@data-curie, $base-prefix)"/>
- </when>
- <otherwise>
- <value-of name="identifier" select="../@data-curie"/>
- </otherwise>
- </choose>
- <text>.xhtml</text>
- </attribute>
- </template>
- <template match="@*|node()" mode="Vocab:render-term" priority="0">
- <copy>
- <apply-templates select="@*|node()" mode="Vocab:render-term"/>
- </copy>
- </template>
-</transform>