Skip to content

Commit

Permalink
added reuse concepts to elements
Browse files Browse the repository at this point in the history
  • Loading branch information
Dragos0000 committed Jul 19, 2023
1 parent ae7d50a commit 1343e8e
Showing 1 changed file with 78 additions and 30 deletions.
108 changes: 78 additions & 30 deletions src/owl-core-lib/elements-owl-core.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -270,23 +270,46 @@
<xsl:variable name="documentation"
select="f:formatDocString(./properties/@documentation)"/>

<skos:ConceptScheme rdf:about="{$conceptSchemeURI}"/>

<xsl:call-template name="coreLayerName">
<xsl:with-param name="elementName" select="$conceptSchemeName"/>
<xsl:with-param name="elementUri" select="$conceptSchemeURI"/>
</xsl:call-template>
<xsl:if test="$documentation != ''">
<xsl:call-template name="coreLayerDescription">
<xsl:with-param name="definition" select="$documentation"/>
<xsl:if
test="not(fn:contains($conceptSchemeURI, $base-ontology-uri)) and $generateReusedConcepts">
<skos:ConceptScheme rdf:about="{$conceptSchemeURI}"/>

<xsl:call-template name="coreLayerName">
<xsl:with-param name="elementName" select="$conceptSchemeName"/>
<xsl:with-param name="elementUri" select="$conceptSchemeURI"/>
</xsl:call-template>
<xsl:if test="$documentation != ''">
<xsl:call-template name="coreLayerDescription">
<xsl:with-param name="definition" select="$documentation"/>
<xsl:with-param name="elementUri" select="$conceptSchemeURI"/>
</xsl:call-template>
</xsl:if>
<!-- TODO ADD COMMENT RULE T05-->

<xsl:call-template name="coreDefinedBy">
<xsl:with-param name="elementUri" select="$conceptSchemeURI"/>
</xsl:call-template>
</xsl:if>
<xsl:if test="fn:contains($conceptSchemeURI, $base-ontology-uri)">
<skos:ConceptScheme rdf:about="{$conceptSchemeURI}"/>

<xsl:call-template name="coreLayerName">
<xsl:with-param name="elementName" select="$conceptSchemeName"/>
<xsl:with-param name="elementUri" select="$conceptSchemeURI"/>
</xsl:call-template>
<xsl:if test="$documentation != ''">
<xsl:call-template name="coreLayerDescription">
<xsl:with-param name="definition" select="$documentation"/>
<xsl:with-param name="elementUri" select="$conceptSchemeURI"/>
</xsl:call-template>
</xsl:if>
<!-- TODO ADD COMMENT RULE T05-->

<xsl:call-template name="coreDefinedBy">
<xsl:with-param name="elementUri" select="$conceptSchemeURI"/>
</xsl:call-template>
</xsl:if>
<!-- TODO ADD COMMENT RULE T05-->

<xsl:call-template name="coreDefinedBy">
<xsl:with-param name="elementUri" select="$conceptSchemeURI"/>
</xsl:call-template>
</xsl:if>

</xsl:template>
Expand All @@ -310,28 +333,53 @@
<xsl:variable name="enumerationURI" select="f:buildURIFromElement(../..)"/>
<xsl:variable name="documentation" select="f:formatDocString(./documentation/@value)"/>

<xsl:if
test="not(fn:contains($enumerationAttributeURI, $base-ontology-uri)) and $generateReusedConcepts">

<skos:Concept rdf:about="{$enumerationAttributeURI}">
<skos:inScheme rdf:resource="{$enumerationURI}"/>

<skos:Concept rdf:about="{$enumerationAttributeURI}">
<skos:inScheme rdf:resource="{$enumerationURI}"/>

</skos:Concept>
</skos:Concept>

<xsl:call-template name="coreLayerName">
<xsl:with-param name="elementName" select="$enumerationAttributeName"/>
<xsl:with-param name="elementUri" select="$enumerationAttributeURI"/>
</xsl:call-template>
<xsl:if test="$documentation != ''">
<xsl:call-template name="coreLayerDescription">
<xsl:with-param name="definition" select="$documentation"/>
<xsl:call-template name="coreLayerName">
<xsl:with-param name="elementName" select="$enumerationAttributeName"/>
<xsl:with-param name="elementUri" select="$enumerationAttributeURI"/>
</xsl:call-template>
<xsl:if test="$documentation != ''">
<xsl:call-template name="coreLayerDescription">
<xsl:with-param name="definition" select="$documentation"/>
<xsl:with-param name="elementUri" select="$enumerationAttributeURI"/>
</xsl:call-template>
</xsl:if>
<!-- TODO ADD COMMENT RULE T05-->

<xsl:call-template name="coreDefinedBy">
<xsl:with-param name="elementUri" select="$enumerationAttributeURI"/>
</xsl:call-template>
</xsl:if>
<xsl:if test="fn:contains($enumerationAttributeURI, $base-ontology-uri)">

<skos:Concept rdf:about="{$enumerationAttributeURI}">
<skos:inScheme rdf:resource="{$enumerationURI}"/>

</skos:Concept>

<xsl:call-template name="coreLayerName">
<xsl:with-param name="elementName" select="$enumerationAttributeName"/>
<xsl:with-param name="elementUri" select="$enumerationAttributeURI"/>
</xsl:call-template>
<xsl:if test="$documentation != ''">
<xsl:call-template name="coreLayerDescription">
<xsl:with-param name="definition" select="$documentation"/>
<xsl:with-param name="elementUri" select="$enumerationAttributeURI"/>
</xsl:call-template>
</xsl:if>
<!-- TODO ADD COMMENT RULE T05-->

<xsl:call-template name="coreDefinedBy">
<xsl:with-param name="elementUri" select="$enumerationAttributeURI"/>
</xsl:call-template>
</xsl:if>
<!-- TODO ADD COMMENT RULE T05-->

<xsl:call-template name="coreDefinedBy">
<xsl:with-param name="elementUri" select="$enumerationAttributeURI"/>
</xsl:call-template>

</xsl:if>
</xsl:template>

Expand Down

0 comments on commit 1343e8e

Please sign in to comment.