schema check and accept header update MPSPARQL-5
[mp-sparql-moved-to-github.git] / doc / sparql.xml
index 838dce1..ba4eca7 100644 (file)
    Configuration consists of one or more db elements. Each db element
    describes how to access a specific database. The db element takes
    attributes name of Z39.50 database (<literal>path</literal>) and
-   HTTP access point of triplestore (<literal>uri</literal>). Each
+   HTTP access point of triplestore (<literal>uri</literal>).
+   Optionally, the schema for the database may be given with attribute
+   <literal>schema</literal>.
+   Each
    db element takes these elements:
    Configurable values:
    <variablelist>
       </para>
      </listitem>
     </varlistentry>
-    <varlistentry><term>&lt;field/&gt;</term>
+    <varlistentry><term>&lt;form/&gt;</term>
      <listitem>
       <para>
-       Optional section for controlling what data rows are selected in the
-       SPARQL statement and how they are mapped to the output document, all
-       variables (\*) are selected when none is provided.
+       SPARQL Query formulation selection. SHould start with one of the
+       query forms: SELECT or CONSTRUCT.
       </para>
      </listitem>
     </varlistentry>
    the field (use attribute) "bf.wtitle" is supported.
    <screen><![CDATA[
   <filter type="sparql">
-    <db path="Default" uri="http://bibframe.indexdata.com/sparql/">
+    <db path="Default"
+        uri="http://bibframe.indexdata.com/sparql/"
+        schema="sparql-results"
+    >
       <prefix>rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns</prefix>
       <prefix>bf: http://bibframe.org/vocab/</prefix>
-      <field>?work ?wtitle</field>
+      <field>SELECT ?work ?wtitle</field>
       <criteria>?work a bf:Work</criteria>
       <criteria>?work bf:workTitle ?wt</criteria>
       <criteria>?wt bf:titleValue ?wtitle</criteria>