sttl.owl2.owl.init.rq Maven / Gradle / Ivy
#
# 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)
export {
function owlfs:pretty(?in) {
let (?t = st:turtle(?in)){
if (st:get(st:html, true),
owlfs:protect(?t), ?t)
}
}
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