SPEX icon indicating copy to clipboard operation
SPEX copied to clipboard

Decouple viewport feature from CBD pragma

Open mchlrch opened this issue 2 years ago • 1 comments

ATM the feature for predefined viewport specification relies on DESCRIBE <.well-known/void> with CBD pragma. It currently does not work on stores that don't support the CBD pragma.

We could switch to loading all statements from all named-graphs (one or many) that are marked as context for the void:

Like this: <.well-known/void> spex:loadFromContext <my-named-graph> .

And then load the void with something like the following:

base <http://example.org/>
construct {
    ?s ?p ?o .
} where {
    {
        select distinct ?s ?p ?o where {
            <.well-known/void> spex:loadFromContext ?g .
            graph ?g {                
                ?s ?p ?o .
            }
        }
    }
}

Marking the named graphs explicitly like this prevents us from accidentally loading too much.

mchlrch avatar Oct 18 '21 08:10 mchlrch