Skip to content

Commit

Permalink
feat: Considering owl:unionOf for rdfs:domain and rdfs:range
Browse files Browse the repository at this point in the history
see #379
  • Loading branch information
Murloc6 committed Feb 8, 2024
1 parent 5b9b1de commit 515b98a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/resources/lode/extraction.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -1322,7 +1322,7 @@ http://www.oxygenxml.com/ns/doc/xsl ">
<xsl:template name="get.class.indomain">
<xsl:variable name="about" select="@*:about|@*:ID" as="xs:string"/>
<xsl:variable name="properties" as="attribute()*"
select="/rdf:RDF/(owl:ObjectProperty|rdf:Property|owl:DatatypeProperty|owl:AnnotationProperty)[some $res in (rdfs:domain|schema:domainIncludes)/(@*:resource|(owl:Class|rdfs:Class)/@*:about) satisfies $res = $about]/(@*:about|@*:ID)"/>
select="/rdf:RDF/(owl:ObjectProperty|rdf:Property|owl:DatatypeProperty|owl:AnnotationProperty)[some $res in (rdfs:domain|schema:domainIncludes)/(@*:resource|(owl:Class|rdfs:Class|owl:Class/owl:unionOf/rdf:Description)/@*:about) satisfies $res = $about]/(@*:about|@*:ID)"/>
<xsl:if test="exists($properties)">
<dt>
<xsl:value-of select="f:getDescriptionLabel('isindomainof')"/>
Expand All @@ -1345,7 +1345,7 @@ http://www.oxygenxml.com/ns/doc/xsl ">
<xsl:template name="get.class.inrange">
<xsl:variable name="about" select="(@*:about|@*:ID)" as="xs:string"/>
<xsl:variable name="properties" as="attribute()*"
select="/rdf:RDF/(owl:ObjectProperty|rdf:Property|owl:DatatypeProperty|owl:AnnotationProperty)[some $res in (rdfs:range|schema:rangeIncludes)/(@*:resource|(owl:Class|rdfs:Class)/@*:about) satisfies $res = $about]/(@*:about|@*:ID)"/>
select="/rdf:RDF/(owl:ObjectProperty|rdf:Property|owl:DatatypeProperty|owl:AnnotationProperty)[some $res in (rdfs:range|schema:rangeIncludes)/(@*:resource|(owl:Class|rdfs:Class|owl:Class/owl:unionOf/rdf:Description)/@*:about) satisfies $res = $about]/(@*:about|@*:ID)"/>
<xsl:if test="exists($properties)">
<dt>
<xsl:value-of select="f:getDescriptionLabel('isinrangeof')"/>
Expand Down Expand Up @@ -2094,15 +2094,15 @@ http://www.oxygenxml.com/ns/doc/xsl ">
<xsl:function name="f:isInDomain" as="xs:boolean">
<xsl:param name="el" as="element()"/>
<xsl:value-of
select="exists($rdf/(owl:ObjectProperty|owl:DatatypeProperty|owl:AnnotationProperty)[some $res in (rdfs:domain|schema:domainIncludes)/(@*:resource|(owl:Class|rdfs:Class)/@*:about) satisfies $res = $el/(@*:about|@*:ID)])"/>
select="exists($rdf/(owl:ObjectProperty|owl:DatatypeProperty|owl:AnnotationProperty)[some $res in (rdfs:domain|schema:domainIncludes)/(@*:resource|(owl:Class|rdfs:Class|owl:Class/owl:unionOf/rdf:Description)/@*:about) satisfies $res = $el/(@*:about|@*:ID)])"/>
</xsl:function>

<xsl:function name="f:hasSubproperties" as="xs:boolean">
<xsl:param name="el" as="element()"/>
<xsl:variable name="type" select="if ($el/self::owl:AnnotationProperty) then 'annotation' else 'property'"
as="xs:string"/>
<xsl:value-of
select="exists($rdf/(if ($type = 'property') then owl:DatatypeProperty | owl:ObjectProperty else owl:AnnotationProperty)[some $res in rdfs:subPropertyOf/(@*:resource|(owl:Class|rdfs:Class)/@*:about) satisfies $res = $el/(@*:about|@*:ID)])"/>
select="exists($rdf/(if ($type = 'property') then owl:DatatypeProperty | owl:ObjectProperty else owl:AnnotationProperty)[some $res in rdfs:subPropertyOf/(@*:resource|(owl:Class|rdfs:Class|owl:Class/owl:unionOf/rdf:Description)/@*:about) satisfies $res = $el/(@*:about|@*:ID)])"/>
</xsl:function>

<xsl:function name="f:getType" as="xs:string?">
Expand Down

0 comments on commit 515b98a

Please sign in to comment.