<docbook><section><title>TutorialREFExample7</title><para> </para>
<bridgehead class="http://www.w3.org/1999/xhtml:h3">List of all Posts and their sections:</bridgehead>
<programlisting>PREFIX rdf: &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt;
PREFIX sioc:   &lt;http://rdfs.org/sioc/ns#&gt;
prefix tutorial: &lt;http://demo.openlinksw.com/schemas/tutorial#&gt;
prefix foaf: &lt;http://xmlns.com/foaf/0.1/&gt;
SELECT *
WHERE 
  {
    ?forum rdf:type tutorial:Post .
    optional{?forum tutorial:belongs_to_section ?belongs_to_section}.
   }
limit 50
</programlisting><bridgehead class="http://www.w3.org/1999/xhtml:h4">Sample Data (Live Query Results)</bridgehead>
 <itemizedlist mark="bullet" spacing="compact"><listitem>Click <ulink url="http://demo.openlinksw.com/tutorial/">*Here*</ulink> for an Interactive-Web View of Virtuoso Tutorials.
</listitem>
<listitem>Click <ulink url="http://demo.openlinksw.com/sparql?default-graph-uri=http%3A%2F%2Fdemo.openlinksw.com%2Ftutorial_view&amp;should-sponge=&amp;query=PREFIX+rdf%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%3E%0D%0APREFIX+sioc%3A+++%3Chttp%3A%2F%2Frdfs.org%2Fsioc%2Fns%23%3E%0D%0Aprefix+tutorial%3A+%3Chttp%3A%2F%2Fdemo.openlinksw.com%2Fschemas%2Ftutorial%23%3E%0D%0Aprefix+foaf%3A+%3Chttp%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2F%3E%0D%0ASELECT+*%0D%0AWHERE+%0D%0A++%7B%0D%0A++++%3Fforum+rdf%3Atype+tutorial%3APost+.%0D%0A++++optional%7B%3Fforum+tutorial%3Abelongs_to_section+%3Fbelongs_to_section%7D.%0D%0A+++%7D%0D%0Alimit+50&amp;format=text%2Fhtml&amp;debug=on">*Here*</ulink> for a live SPARQL Query (via SPARQL Protocol) against a collection of Virtuoso Tutorials.
</listitem>
</itemizedlist></section></docbook>