sttl.turtle.start.rq Maven / Gradle / Ivy
#
# Turtle Pretty Printer
# Olivier Corby, Wimmics Inria I3S, 2013
#
template st:start {
st:prolog("@prefix")
st:nl()
str(?main)
st:nl()
st:nl()
str(?bnode)
}
where {
# clean st:bnode table if any
bind (st:cset(st:bnode) as ?bn)
bind (st:set(st:allgraph, true) as ?s1)
# pprint URI and subject only bnode
bind (st:set(st:reference, false) as ?ref1)
bind (st:call-template(st:main) as ?main)
# pprint bnode as _:b instead of []
bind (st:set(st:reference, true) as ?ref2)
# pprint other bnodes that are subject and object
bind (st:call-template(st:bnode) as ?bnode)
bind (st:set(st:allgraph, false) as ?s2)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy