sttl.owl2.owl.init.rq Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of corese-core Show documentation
Show all versions of corese-core Show documentation
Corese is a Semantic Web Factory (triple store and SPARQL endpoint) implementing RDF, RDFS, SPARQL 1.1
Query and Update.
#
# defaut processing of a variable is
# st:turtle on URI
# st:apply-templates on Blank and Literal
# Functions in package are exported and can be reused in subtransformations
# Olivier Corby, Wimmics Inria I3S, 2014
#
prefix owlfs:
template st:profile(?in) {
}
where {}
function st:process(?in) {
if (isURI(?in), owlfs:pretty(?in),
st:apply-templates(?in))
}
# export to sub transformations (export to Interpreter)
@public {
function owlfs:pretty(?in) {
let (?t = st:turtle(?in)){
if (st:get(st:html, true),
owlfs:protect(?t), ?t)
}
}
function owlfs:display(?in) {
if (st:get(st:html, true), owlfs:protect(?in), ?in)
}
function owlfs:protect(?s) {
replace(replace(?s, "&", "&"), "<", "<")
}
# used by sub transformations, with st:owlexp
function owlfs:process(?in) {
if (isURI(?in), owlfs:pretty(?in),
st:apply-templates-with(st:owlexp, ?in))
}
}
function xt:nl(?x, ?n) {
if (?x = "", ?x,
concat(?x, if (?n = 1, "\n", "\n\n")))
}
function xt:system(?t) {
(strstarts(?t, owl:)
|| strstarts(?t, rdf:)
|| strstarts(?t, rdfs:)
|| strstarts(?t, xsd:))
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy