template.owl.rul 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.
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:))
}
]]>
OWL Functional Syntax"
""
st:call-template(st:start)
"
"
st:call-template-with(st:server, st:tail)
}
where {
bind(st:export(st:html, true) as ?ctx)
}
]]>
template st:prefix {
format {
"Prefix(%s: = %s%s>)\n"
str(?p) owlfs:display("<") str(?n)
}
; separator= ""
}
where {
bind (kg:unnest(st:prefix()) as (?p, ?n))
}
]]>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy