Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
uib-ub
Momayo
onto-momayo
Commits
dac23c1a
Commit
dac23c1a
authored
Feb 08, 2019
by
ØyvindG
Committed by
Tarje.Lavik
Feb 20, 2019
Browse files
stilark som legger til invers relasjon og sletter individual objekts
parent
3a854f86
Changes
1
Hide whitespace changes
Inline
Side-by-side
scripts/owl2toOwl.xsl
0 → 100644
View file @
dac23c1a
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
xmlns:xsl=
"http://www.w3.org/1999/XSL/Transform"
xmlns:xs=
"http://www.w3.org/2001/XMLSchema"
xmlns:rdf=
"http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:owl=
"http://www.w3.org/2002/07/owl#"
xmlns:math=
"http://www.w3.org/2005/xpath-functions/math"
exclude-result-prefixes=
"xs math"
version=
"3.0"
>
<xsl:mode
on-no-match=
"shallow-copy"
/>
<xsl:key
name=
"inverse"
match=
"rdf:RDF/owl:*"
use=
"owl:inverseOf/@rdf:resource"
/>
<!-- insert inverse properties-->
<xsl:template
match=
"*/owl:*[matches(name(),'property','i') and key('inverse',@rdf:about) and not(owl:inverseOf)]"
>
<xsl:copy>
<xsl:copy-of
select=
"@*"
/>
<xsl:apply-templates/>
<owl:inverseOf
rdf:resouce=
"{key('inverse',@rdf:about)/@rdf:about}"
/><xsl:text>
</xsl:text>
</xsl:copy>
</xsl:template>
<!-- delete named individuals -->
<xsl:template
match=
"owl:NamedIndividual"
/>
</xsl:stylesheet>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment