sttl.spin.query.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 and Literal
# st:apply-templates on Blank
#
# Olivier Corby, Wimmics Inria I3S, 2014
#
template st:profile {
}
where {
}
function st:process(?in) {
if (st:get(st:mode, st:html), st:html(?in), st:std(?in))
}
function st:html(?in) {
if (isBlank(?in), st:blank(?in), st:protect(?in))
}
function st:std(?in) {
if (isBlank(?in), st:apply-templates(?in), st:turtle(?in))
}
function st:blank(?in){
if (st:visited(?in),
concat("", st:apply-templates(?in), ""),
concat("",
st:apply-templates(?in), ""))
}
function st:protect2(?in) {
let (?t = st:turtle(?in)){
if (strstarts(?t, "<"),
replace(?t, "<", "<"),
?t)
}
}
function st:protect(?in) {
xt:protect(st:turtle(?in))
}
function xt:protect(?s) {
replace(replace(?s, "&", "&"), "<", "<")
}
function xt:pprotect(?s) {
if (st:get(st:mode, st:html), xt:protect(?s), ?s)
}
function st:kw(?x) {
if (st:get(st:mode, st:html), st:htmlkw(?x), st:stdkw(?x))
}
function st:htmlkw(?x) {
concat("", str(?x), "")
}
function st:stdkw(?x) {
str(?x)
}
function st:namespace() {
let (?p = st:prolog()){
if (st:get(st:mode, st:html),
replace(?p, "<", "<"),
?p)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy