I am trying to get the hang of VSP and am currently a bit stuck on
getting info from sparql queries in FOR constructs.
Named variables are ok, but how do I get
select (lang(?label)) count(..) ...
values?

A part of my VSP code(I got '$:subject' from a surrounding "FOR (sparql select .."):
<td>
<?vsp
FOR (sparql select ?s_type where {$:subject a ?s_type}) DO {
 if (s_type = 'http://www.w3.org/2004/02/skos/core#Concept') {
    http('preflabels:');
    declare nr int;
    nr := 0;
FOR (sparql select ?labl (lang(?labl)) where {$:subject skos:prefLabel ?labl}) DO { ^^^^^^^^^^ HOW DO I GET THE lang(?labl) VALUE?
       if (nr > 0 ) { http_value(',');}
       http_value(labl);
       nr := nr + 1;
    }
} else if (s_type = 'http://data.catchplus.nl/rdf/config/ConceptSchemeGroup') {
...

I would like access to sparql select values that are not named, here:
"(lang(?labl))" from outside the sparql query.

Also, are there more VSP example programs outside of the virtdocs.pdf and online parts of
that document?

Thanks,

Lourens

Reply via email to