All Downloads are FREE. Search and download functionalities are using the official Maven repository.

query.extension.rq Maven / Gradle / Ivy

Go to download

Corese is a Semantic Web Factory (triple store and SPARQL endpoint) implementing RDF, RDFS, SPARQL 1.1 Query and Update.

There is a newer version: 4.6.1
Show newest version
@public package { 

# Specify focus node of transformation 
# default is st:get(st:uri) as usual
# no focus :
# st:param [ st:focus false ]
# focus on st:get(st:elem)
# st:param [ st:focus st:elem ]
function st:focus(){
    st:get(coalesce(st:get(st:focus), st:uri))
}

function xt:turtle() {  
    st:apply-templates-with(st:turtle)
}

function xt:turtle(?x) {  
    if (isLiteral(?x) && datatype(?x) = dt:graph){
        xt:focus(?x, st:apply-templates-with(st:turtle))
    }
    else {
        st:apply-templates-with(st:turtle, ?x)
    }
}

function xt:rdfxml() {  
    st:apply-templates-with(st:rdfxml)
}

function xt:json() {  
    st:apply-templates-with(st:json)
}

function xt:json(?x) {  
    st:apply-templates-with(st:json, ?x)
}

function xt:owl() {  
    st:apply-templates-with(st:owl)
}

function xt:owl(?x) {  
    st:apply-templates-with(st:owl, ?x)
}

function xt:spin() {  
    st:apply-templates-with(st:spin)
}

function xt:spin(?x) {  
    st:apply-templates-with(st:spin, ?x)
}

function st:list(?t) { 
    let (?l = st:call-template-with(st:list, st:list, ?t)){
        if (! isLiteral(?l) || datatype(?l) != dt:list){
            xt:list(?l) }
        else { ?l }
    }
}

}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy