fct_exec API Example
The following example shows how to use the fct_exec APi in vsp page to perform a "text" search for the word "Mike" assuming this exists in your Virtuoso RDF store (if not amend the query in the fct_example.vsp code sample below to search for text known to exist).
- The service can be used in the following sample fct_example.vsp:
<?vsp declare txt, reply, tree any; declare timeout int; tree := xtree_doc (' <query> <text>Mike</text> <view type="text"/> </query> '); timeout := 3000; reply := fct_exec (tree, timeout); txt := string_output (); http_value (xslt ('virt://WS.WS.SYS_DAV_RES.RES_FULL_PATH.RES_CONTENT:/DAV/fct_example.xsl', reply, vector ()), null, txt); http (txt); ?>
- The xsl can be viewed here.
- The result of executing the fct_example.vsp should be:
Related
- Virtuoso Facets Web Service
- Faceted Views over Large-Scale Linked Data
- Virtuoso APIs for FCT REST services
- Virtuoso Facet Browser Installation and configuration
- Virtuoso 6.0 TP1
- Virtuoso Facet Browser VAD package