Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Considering owl:unionOf for rdfs:domain and rdfs:range #679

Merged
merged 1 commit into from
Feb 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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