jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r866584 [19/21] - in /websites/staging/jena/trunk/content: ./ documentation/assembler/ documentation/inference/ documentation/io/ documentation/javadoc/arq/ documentation/javadoc/fuseki/ documentation/javadoc/jena/ documentation/javadoc/lar...
Date Thu, 20 Jun 2013 10:18:36 GMT
Modified: websites/staging/jena/trunk/content/tutorials/sparql_datasets_pt.html
==============================================================================
--- websites/staging/jena/trunk/content/tutorials/sparql_datasets_pt.html (original)
+++ websites/staging/jena/trunk/content/tutorials/sparql_datasets_pt.html Thu Jun 20 10:18:34 2013
@@ -164,13 +164,12 @@ Ele consiste de um grafo padrão, e ce
 <a href="sparql_optionals_pt.html"><code>OPTIONAL</code>s</a>, e <a href="sparql_union_pt.html"><code>UNION</code>s</a>) funcionam em um grafo RDF.  Isso começa por ser o grafo padrão do conjunto de dados, 
 mas pode ser alterado pela palavra-chave <code>GRAPH</code>.
     GRAPH uri { ... padrão ... }</p>
-<div class="codehilite"><pre><span class="n">GRAPH</span> <span class="n">var</span> <span class="p">{</span> <span class="o">...</span> <span class="n">padr</span><span class="err">ã</span><span class="n">o</span> <span class="o">...</span> <span class="p">}</span>
+<div class="codehilite"><pre><span class="n">GRAPH</span> <span class="n">var</span> <span class="p">{</span> <span class="p">...</span> <span class="n">padr</span>ã<span class="n">o</span> <span class="p">...</span> <span class="p">}</span>
 </pre></div>
 
 
 <p>Se um URI é fornecido, o padrão vai ser casado contra o grafo no dataset com esse nome – se não houver um, 
-então clausula <code>GRAPH</code> falhará ao tentar casar.<br />
-</p>
+então clausula <code>GRAPH</code> falhará ao tentar casar.  </p>
 <p>Se uma variável é dada, todos os grafos nomeados (não o grafo padrão) 
 são testados. A variavel pode ser usada em outro lugar, então, durante a execução, esse valor 
 já é conhecido para a solução, somente o grafo nomeado é testado.</p>
@@ -183,35 +182,35 @@ ou alguns grafos podem compartilhar trip
 <p>Nos exemplos abaixo, vamos usar o seguinte dataset que pode ocorrer para um 
 RDF agregador de um livro de detalhes:</p>
 <p>Grafo padrão (<a href="sparql_data/ds-dft.ttl">ds-dft.ttl</a>):</p>
-<div class="codehilite"><pre><span class="nv">@prefix</span> <span class="n">dc:</span> <span class="sr">&lt;http://purl.org/dc/elements/1.1/&gt;</span> <span class="o">.</span>
-<span class="nv">@prefix</span> <span class="n">xsd:</span> <span class="sr">&lt;http://www.w3.org/2001/XMLSchema#&gt;</span> <span class="o">.</span>
+<div class="codehilite"><pre><span class="p">@</span><span class="n">prefix</span> <span class="n">dc</span><span class="p">:</span> <span class="o">&lt;</span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">purl</span><span class="p">.</span><span class="n">org</span><span class="o">/</span><span class="n">dc</span><span class="o">/</span><span class="n">elements</span><span class="o">/</span>1<span class="p">.</span>1<span class="o">/&gt;</span> <span class="p">.</span>
+<span class="p">@</span><span class="n">prefix</span> <span class="n">xsd</span><span class="p">:</span> <span class="o">&lt;</span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">www</span><span class="p">.</span><span class="n">w3</span><span class="p">.</span><span class="n">org</span><span class="o">/</span>2001<span class="o">/</span><span class="n">XMLSchema</span>#<span class="o">&gt;</span> <span class="p">.</span>
 
-<span class="sr">&lt;ds-ng-1.ttl&gt;</span> <span class="n">dc:date</span> <span class="s">&quot;2005-07-14T03:18:56+0100&quot;</span><span class="o">^^</span><span class="n">xsd:dateTime</span> <span class="o">.</span>
-<span class="sr">&lt;ds-ng-2.ttl&gt;</span> <span class="n">dc:date</span> <span class="s">&quot;2005-09-22T05:53:05+0100&quot;</span><span class="o">^^</span><span class="n">xsd:dateTime</span> <span class="o">.</span>
+<span class="o">&lt;</span><span class="n">ds</span><span class="o">-</span><span class="n">ng</span><span class="o">-</span>1<span class="p">.</span><span class="n">ttl</span><span class="o">&gt;</span> <span class="n">dc</span><span class="p">:</span><span class="n">date</span> &quot;2005<span class="o">-</span>07<span class="o">-</span>14<span class="n">T03</span><span class="p">:</span>18<span class="p">:</span>56<span class="o">+</span>0100&quot;^^<span class="n">xsd</span><span class="p">:</span><span class="n">dateTime</span> <span class="p">.</span>
+<span class="o">&lt;</span><span class="n">ds</span><span class="o">-</span><span class="n">ng</span><span class="o">-</span>2<span class="p">.</span><span class="n">ttl</span><span class="o">&gt;</span> <span class="n">dc</span><span class="p">:</span><span class="n">date</span> &quot;2005<span class="o">-</span>09<span class="o">-</span>22<span class="n">T05</span><span class="p">:</span>53<span class="p">:</span>05<span class="o">+</span>0100&quot;^^<span class="n">xsd</span><span class="p">:</span><span class="n">dateTime</span> <span class="p">.</span>
 </pre></div>
 
 
 <p>Grafo nomeado (<a href="sparql_data/ds-ng-1.ttl">ds-ng-1.ttl</a>):</p>
-<div class="codehilite"><pre><span class="nv">@prefix</span> <span class="n">dc:</span> <span class="sr">&lt;http://purl.org/dc/elements/1.1/&gt;</span> <span class="o">.</span>
+<div class="codehilite"><pre><span class="p">@</span><span class="n">prefix</span> <span class="n">dc</span><span class="p">:</span> <span class="o">&lt;</span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">purl</span><span class="p">.</span><span class="n">org</span><span class="o">/</span><span class="n">dc</span><span class="o">/</span><span class="n">elements</span><span class="o">/</span>1<span class="p">.</span>1<span class="o">/&gt;</span> <span class="p">.</span>
 
-<span class="o">[]</span> <span class="n">dc:title</span> <span class="s">&quot;Harry Potter and the Philospher&#39;s Stone&quot;</span> <span class="o">.</span>
-<span class="o">[]</span> <span class="n">dc:title</span> <span class="s">&quot;Harry Potter and the Chamber of Secrets&quot;</span> <span class="o">.</span>
+<span class="p">[]</span> <span class="n">dc</span><span class="p">:</span><span class="n">title</span> &quot;<span class="n">Harry</span> <span class="n">Potter</span> <span class="n">and</span> <span class="n">the</span> <span class="n">Philospher</span><span class="o">&#39;</span><span class="n">s</span> <span class="n">Stone</span>&quot; <span class="p">.</span>
+<span class="p">[]</span> <span class="n">dc</span><span class="p">:</span><span class="n">title</span> &quot;<span class="n">Harry</span> <span class="n">Potter</span> <span class="n">and</span> <span class="n">the</span> <span class="n">Chamber</span> <span class="n">of</span> <span class="n">Secrets</span>&quot; <span class="p">.</span>
 </pre></div>
 
 
 <p>Grafo nomeado (<a href="sparql_data/ds-ng-2.ttl">ds-ng-2.ttl</a>):</p>
-<div class="codehilite"><pre><span class="nv">@prefix</span> <span class="n">dc:</span> <span class="sr">&lt;http://purl.org/dc/elements/1.1/&gt;</span> <span class="o">.</span>
+<div class="codehilite"><pre><span class="p">@</span><span class="n">prefix</span> <span class="n">dc</span><span class="p">:</span> <span class="o">&lt;</span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">purl</span><span class="p">.</span><span class="n">org</span><span class="o">/</span><span class="n">dc</span><span class="o">/</span><span class="n">elements</span><span class="o">/</span>1<span class="p">.</span>1<span class="o">/&gt;</span> <span class="p">.</span>
 
-<span class="o">[]</span> <span class="n">dc:title</span> <span class="s">&quot;Harry Potter and the Sorcerer&#39;s Stone&quot;</span> <span class="o">.</span>
-<span class="o">[]</span> <span class="n">dc:title</span> <span class="s">&quot;Harry Potter and the Chamber of Secrets&quot;</span> <span class="o">.</span>
+<span class="p">[]</span> <span class="n">dc</span><span class="p">:</span><span class="n">title</span> &quot;<span class="n">Harry</span> <span class="n">Potter</span> <span class="n">and</span> <span class="n">the</span> <span class="n">Sorcerer</span><span class="o">&#39;</span><span class="n">s</span> <span class="n">Stone</span>&quot; <span class="p">.</span>
+<span class="p">[]</span> <span class="n">dc</span><span class="p">:</span><span class="n">title</span> &quot;<span class="n">Harry</span> <span class="n">Potter</span> <span class="n">and</span> <span class="n">the</span> <span class="n">Chamber</span> <span class="n">of</span> <span class="n">Secrets</span>&quot; <span class="p">.</span>
 </pre></div>
 
 
 <p>Isto é, nós temos dois pequenos grafos descrevendo alguns livros, 
 e nós temos um grafo padrão que armazena quando esses grafos foram lidos pela última vez. </p>
 <p>As consultas podem ser executadas via linha de comando (tudo numa linha):</p>
-<div class="codehilite"><pre><span class="n">java</span> <span class="o">-</span><span class="n">cp</span> <span class="o">...</span> <span class="n">arq</span><span class="o">.</span><span class="n">sparql</span>
-    <span class="o">--</span><span class="n">graph</span> <span class="n">ds</span><span class="o">-</span><span class="n">dft</span><span class="o">.</span><span class="n">ttl</span> <span class="o">--</span><span class="n">namedgraph</span> <span class="n">ds</span><span class="o">-</span><span class="n">ng</span><span class="o">-</span><span class="mi">1</span><span class="o">.</span><span class="n">ttl</span> <span class="o">--</span><span class="n">namedgraph</span> <span class="n">ds</span><span class="o">-</span><span class="n">ng</span><span class="o">-</span><span class="mi">2</span><span class="o">.</span><span class="n">ttl</span>
+<div class="codehilite"><pre><span class="n">java</span> <span class="o">-</span><span class="n">cp</span> <span class="p">...</span> <span class="n">arq</span><span class="p">.</span><span class="n">sparql</span>
+    <span class="o">--</span><span class="n">graph</span> <span class="n">ds</span><span class="o">-</span><span class="n">dft</span><span class="p">.</span><span class="n">ttl</span> <span class="o">--</span><span class="n">namedgraph</span> <span class="n">ds</span><span class="o">-</span><span class="n">ng</span><span class="o">-</span>1<span class="p">.</span><span class="n">ttl</span> <span class="o">--</span><span class="n">namedgraph</span> <span class="n">ds</span><span class="o">-</span><span class="n">ng</span><span class="o">-</span>2<span class="p">.</span><span class="n">ttl</span>
     <span class="o">--</span><span class="n">query</span> <span class="n">query</span> <span class="n">file</span>
 </pre></div>
 
@@ -221,12 +220,12 @@ Eles podem ser criados e armazenados num
 <h3 id="acessando-o-dataset">Acessando o Dataset</h3>
 <p>O primeiro exemplo apenas acessa o grafo padrão:
 (<a href="sparql_data/q-ds-1.rq">q-ds-1.rq</a>):</p>
-<div class="codehilite"><pre><span class="n">PREFIX</span> <span class="n">xsd:</span> <span class="sr">&lt;http://www.w3.org/2001/XMLSchema#&gt;</span>
-<span class="n">PREFIX</span> <span class="n">dc:</span> <span class="sr">&lt;http://purl.org/dc/elements/1.1/&gt;</span>
-<span class="n">PREFIX</span> <span class="p">:</span> <span class="sr">&lt;.&gt;</span>
+<div class="codehilite"><pre><span class="n">PREFIX</span> <span class="n">xsd</span><span class="p">:</span> <span class="o">&lt;</span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">www</span><span class="p">.</span><span class="n">w3</span><span class="p">.</span><span class="n">org</span><span class="o">/</span>2001<span class="o">/</span><span class="n">XMLSchema</span>#<span class="o">&gt;</span>
+<span class="n">PREFIX</span> <span class="n">dc</span><span class="p">:</span> <span class="o">&lt;</span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">purl</span><span class="p">.</span><span class="n">org</span><span class="o">/</span><span class="n">dc</span><span class="o">/</span><span class="n">elements</span><span class="o">/</span>1<span class="p">.</span>1<span class="o">/&gt;</span>
+<span class="n">PREFIX</span> <span class="p">:</span> <span class="o">&lt;</span><span class="p">.</span><span class="o">&gt;</span>
 
 <span class="n">SELECT</span> <span class="o">*</span>
-<span class="p">{</span> <span class="p">?</span><span class="n">s</span> <span class="p">?</span><span class="n">p</span> <span class="p">?</span><span class="n">o</span> <span class="p">}</span>
+<span class="p">{</span> ?<span class="n">s</span> ?<span class="n">p</span> ?<span class="n">o</span> <span class="p">}</span>
 </pre></div>
 
 
@@ -234,8 +233,8 @@ Eles podem ser criados e armazenados num
 <div class="codehilite"><pre><span class="o">----------------------------------------------------------------------</span>
 <span class="o">|</span> <span class="n">s</span>            <span class="o">|</span> <span class="n">p</span>       <span class="o">|</span> <span class="n">o</span>                                         <span class="o">|</span>
 <span class="o">======================================================================</span>
-<span class="o">|</span> <span class="p">:</span><span class="n">ds</span><span class="o">-</span><span class="n">ng</span><span class="o">-</span><span class="mi">2</span><span class="o">.</span><span class="n">ttl</span> <span class="o">|</span> <span class="n">dc:date</span> <span class="o">|</span> <span class="s">&quot;2005-09-22T05:53:05+01:00&quot;</span><span class="o">^^</span><span class="n">xsd:dateTime</span> <span class="o">|</span>
-<span class="o">|</span> <span class="p">:</span><span class="n">ds</span><span class="o">-</span><span class="n">ng</span><span class="o">-</span><span class="mi">1</span><span class="o">.</span><span class="n">ttl</span> <span class="o">|</span> <span class="n">dc:date</span> <span class="o">|</span> <span class="s">&quot;2005-07-14T03:18:56+01:00&quot;</span><span class="o">^^</span><span class="n">xsd:dateTime</span> <span class="o">|</span>
+<span class="o">|</span> <span class="p">:</span><span class="n">ds</span><span class="o">-</span><span class="n">ng</span><span class="o">-</span>2<span class="p">.</span><span class="n">ttl</span> <span class="o">|</span> <span class="n">dc</span><span class="p">:</span><span class="n">date</span> <span class="o">|</span> &quot;2005<span class="o">-</span>09<span class="o">-</span>22<span class="n">T05</span><span class="p">:</span>53<span class="p">:</span>05<span class="o">+</span>01<span class="p">:</span>00&quot;^^<span class="n">xsd</span><span class="p">:</span><span class="n">dateTime</span> <span class="o">|</span>
+<span class="o">|</span> <span class="p">:</span><span class="n">ds</span><span class="o">-</span><span class="n">ng</span><span class="o">-</span>1<span class="p">.</span><span class="n">ttl</span> <span class="o">|</span> <span class="n">dc</span><span class="p">:</span><span class="n">date</span> <span class="o">|</span> &quot;2005<span class="o">-</span>07<span class="o">-</span>14<span class="n">T03</span><span class="p">:</span>18<span class="p">:</span>56<span class="o">+</span>01<span class="p">:</span>00&quot;^^<span class="n">xsd</span><span class="p">:</span><span class="n">dateTime</span> <span class="o">|</span>
 <span class="o">----------------------------------------------------------------------</span>
 </pre></div>
 
@@ -244,13 +243,13 @@ Eles podem ser criados e armazenados num
 seja informado explicitamente via <code>GRAPH</code>.</p>
 <p>Nós podemos consultar todas as triplas ao consultar o grafo padrão e os grafos nomeados:
 (<a href="sparql_data/q-ds-2.rq">q-ds-2.rq</a>):</p>
-<div class="codehilite"><pre><span class="n">PREFIX</span>  <span class="n">xsd:</span>    <span class="sr">&lt;http://www.w3.org/2001/XMLSchema#&gt;</span>
-<span class="n">PREFIX</span>  <span class="n">dc:</span>     <span class="sr">&lt;http://purl.org/dc/elements/1.1/&gt;</span>
-<span class="n">PREFIX</span>  <span class="p">:</span>       <span class="sr">&lt;.&gt;</span>
+<div class="codehilite"><pre><span class="n">PREFIX</span>  <span class="n">xsd</span><span class="p">:</span>    <span class="o">&lt;</span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">www</span><span class="p">.</span><span class="n">w3</span><span class="p">.</span><span class="n">org</span><span class="o">/</span>2001<span class="o">/</span><span class="n">XMLSchema</span>#<span class="o">&gt;</span>
+<span class="n">PREFIX</span>  <span class="n">dc</span><span class="p">:</span>     <span class="o">&lt;</span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">purl</span><span class="p">.</span><span class="n">org</span><span class="o">/</span><span class="n">dc</span><span class="o">/</span><span class="n">elements</span><span class="o">/</span>1<span class="p">.</span>1<span class="o">/&gt;</span>
+<span class="n">PREFIX</span>  <span class="p">:</span>       <span class="o">&lt;</span><span class="p">.</span><span class="o">&gt;</span>
 
 <span class="n">SELECT</span> <span class="o">*</span>
 <span class="p">{</span>
-    <span class="p">{</span> <span class="p">?</span><span class="n">s</span> <span class="p">?</span><span class="n">p</span> <span class="p">?</span><span class="n">o</span> <span class="p">}</span> <span class="n">UNION</span> <span class="p">{</span> <span class="n">GRAPH</span> <span class="p">?</span><span class="n">g</span> <span class="p">{</span> <span class="p">?</span><span class="n">s</span> <span class="p">?</span><span class="n">p</span> <span class="p">?</span><span class="n">o</span> <span class="p">}</span> <span class="p">}</span>
+    <span class="p">{</span> ?<span class="n">s</span> ?<span class="n">p</span> ?<span class="n">o</span> <span class="p">}</span> <span class="n">UNION</span> <span class="p">{</span> <span class="n">GRAPH</span> ?<span class="n">g</span> <span class="p">{</span> ?<span class="n">s</span> ?<span class="n">p</span> ?<span class="n">o</span> <span class="p">}</span> <span class="p">}</span>
 <span class="p">}</span>
 </pre></div>
 
@@ -258,13 +257,13 @@ seja informado explicitamente via <code>
 <p>resultando em:</p>
 <div class="codehilite"><pre><span class="o">---------------------------------------------------------------------------------------</span>
 <span class="o">|</span> <span class="n">s</span>            <span class="o">|</span> <span class="n">p</span>        <span class="o">|</span> <span class="n">o</span>                                          <span class="o">|</span> <span class="n">g</span>            <span class="o">|</span>
-<span class="o">=======================================================================================</span>
-<span class="o">|</span> <span class="p">:</span><span class="n">ds</span><span class="o">-</span><span class="n">ng</span><span class="o">-</span><span class="mi">2</span><span class="o">.</span><span class="n">ttl</span> <span class="o">|</span> <span class="n">dc:date</span>  <span class="o">|</span> <span class="s">&quot;2005-09-22T05:53:05+01:00&quot;</span><span class="o">^^</span><span class="n">xsd:dateTime</span>  <span class="o">|</span>              <span class="o">|</span>
-<span class="o">|</span> <span class="p">:</span><span class="n">ds</span><span class="o">-</span><span class="n">ng</span><span class="o">-</span><span class="mi">1</span><span class="o">.</span><span class="n">ttl</span> <span class="o">|</span> <span class="n">dc:date</span>  <span class="o">|</span> <span class="s">&quot;2005-07-14T03:18:56+01:00&quot;</span><span class="o">^^</span><span class="n">xsd:dateTime</span>  <span class="o">|</span>              <span class="o">|</span>
-<span class="o">|</span> <span class="n">_:b0</span>         <span class="o">|</span> <span class="n">dc:title</span> <span class="o">|</span> <span class="s">&quot;Harry Potter and the Sorcerer&#39;s Stone&quot;</span>    <span class="o">|</span> <span class="p">:</span><span class="n">ds</span><span class="o">-</span><span class="n">ng</span><span class="o">-</span><span class="mi">2</span><span class="o">.</span><span class="n">ttl</span> <span class="o">|</span>
-<span class="o">|</span> <span class="n">_:b1</span>         <span class="o">|</span> <span class="n">dc:title</span> <span class="o">|</span> <span class="s">&quot;Harry Potter and the Chamber of Secrets&quot;</span>  <span class="o">|</span> <span class="p">:</span><span class="n">ds</span><span class="o">-</span><span class="n">ng</span><span class="o">-</span><span class="mi">2</span><span class="o">.</span><span class="n">ttl</span> <span class="o">|</span>
-<span class="o">|</span> <span class="n">_:b2</span>         <span class="o">|</span> <span class="n">dc:title</span> <span class="o">|</span> <span class="s">&quot;Harry Potter and the Chamber of Secrets&quot;</span>  <span class="o">|</span> <span class="p">:</span><span class="n">ds</span><span class="o">-</span><span class="n">ng</span><span class="o">-</span><span class="mi">1</span><span class="o">.</span><span class="n">ttl</span> <span class="o">|</span>
-<span class="o">|</span> <span class="n">_:b3</span>         <span class="o">|</span> <span class="n">dc:title</span> <span class="o">|</span> <span class="s">&quot;Harry Potter and the Philospher&#39;s Stone&quot;</span>  <span class="o">|</span> <span class="p">:</span><span class="n">ds</span><span class="o">-</span><span class="n">ng</span><span class="o">-</span><span class="mi">1</span><span class="o">.</span><span class="n">ttl</span> <span class="o">|</span>
+<span class="o">======================================================================================</span><span class="p">=</span>
+<span class="o">|</span> <span class="p">:</span><span class="n">ds</span><span class="o">-</span><span class="n">ng</span><span class="o">-</span>2<span class="p">.</span><span class="n">ttl</span> <span class="o">|</span> <span class="n">dc</span><span class="p">:</span><span class="n">date</span>  <span class="o">|</span> &quot;2005<span class="o">-</span>09<span class="o">-</span>22<span class="n">T05</span><span class="p">:</span>53<span class="p">:</span>05<span class="o">+</span>01<span class="p">:</span>00&quot;^^<span class="n">xsd</span><span class="p">:</span><span class="n">dateTime</span>  <span class="o">|</span>              <span class="o">|</span>
+<span class="o">|</span> <span class="p">:</span><span class="n">ds</span><span class="o">-</span><span class="n">ng</span><span class="o">-</span>1<span class="p">.</span><span class="n">ttl</span> <span class="o">|</span> <span class="n">dc</span><span class="p">:</span><span class="n">date</span>  <span class="o">|</span> &quot;2005<span class="o">-</span>07<span class="o">-</span>14<span class="n">T03</span><span class="p">:</span>18<span class="p">:</span>56<span class="o">+</span>01<span class="p">:</span>00&quot;^^<span class="n">xsd</span><span class="p">:</span><span class="n">dateTime</span>  <span class="o">|</span>              <span class="o">|</span>
+<span class="o">|</span> <span class="n">_</span><span class="p">:</span><span class="n">b0</span>         <span class="o">|</span> <span class="n">dc</span><span class="p">:</span><span class="n">title</span> <span class="o">|</span> &quot;<span class="n">Harry</span> <span class="n">Potter</span> <span class="n">and</span> <span class="n">the</span> <span class="n">Sorcerer</span><span class="o">&#39;</span><span class="n">s</span> <span class="n">Stone</span>&quot;    <span class="o">|</span> <span class="p">:</span><span class="n">ds</span><span class="o">-</span><span class="n">ng</span><span class="o">-</span>2<span class="p">.</span><span class="n">ttl</span> <span class="o">|</span>
+<span class="o">|</span> <span class="n">_</span><span class="p">:</span><span class="n">b1</span>         <span class="o">|</span> <span class="n">dc</span><span class="p">:</span><span class="n">title</span> <span class="o">|</span> &quot;<span class="n">Harry</span> <span class="n">Potter</span> <span class="n">and</span> <span class="n">the</span> <span class="n">Chamber</span> <span class="n">of</span> <span class="n">Secrets</span>&quot;  <span class="o">|</span> <span class="p">:</span><span class="n">ds</span><span class="o">-</span><span class="n">ng</span><span class="o">-</span>2<span class="p">.</span><span class="n">ttl</span> <span class="o">|</span>
+<span class="o">|</span> <span class="n">_</span><span class="p">:</span><span class="n">b2</span>         <span class="o">|</span> <span class="n">dc</span><span class="p">:</span><span class="n">title</span> <span class="o">|</span> &quot;<span class="n">Harry</span> <span class="n">Potter</span> <span class="n">and</span> <span class="n">the</span> <span class="n">Chamber</span> <span class="n">of</span> <span class="n">Secrets</span>&quot;  <span class="o">|</span> <span class="p">:</span><span class="n">ds</span><span class="o">-</span><span class="n">ng</span><span class="o">-</span>1<span class="p">.</span><span class="n">ttl</span> <span class="o">|</span>
+<span class="o">|</span> <span class="n">_</span><span class="p">:</span><span class="n">b3</span>         <span class="o">|</span> <span class="n">dc</span><span class="p">:</span><span class="n">title</span> <span class="o">|</span> &quot;<span class="n">Harry</span> <span class="n">Potter</span> <span class="n">and</span> <span class="n">the</span> <span class="n">Philospher</span><span class="o">&#39;</span><span class="n">s</span> <span class="n">Stone</span>&quot;  <span class="o">|</span> <span class="p">:</span><span class="n">ds</span><span class="o">-</span><span class="n">ng</span><span class="o">-</span>1<span class="p">.</span><span class="n">ttl</span> <span class="o">|</span>
 <span class="o">---------------------------------------------------------------------------------------</span>
 </pre></div>
 
@@ -272,13 +271,13 @@ seja informado explicitamente via <code>
 <h3 id="consultando-um-grafo-especifico">Consultando um grafo especifico</h3>
 <p>Se a aplicação souber o nome do grafo, ele pode consultar diretamente títulos num grafo dado:
 (<a href="sparql_data/q-ds-3.rq">q-ds-3.rq</a>):</p>
-<div class="codehilite"><pre><span class="n">PREFIX</span> <span class="n">dc:</span> <span class="sr">&lt;http://purl.org/dc/elements/1.1/&gt;</span>
-<span class="n">PREFIX</span> <span class="p">:</span> <span class="sr">&lt;.&gt;</span>
+<div class="codehilite"><pre><span class="n">PREFIX</span> <span class="n">dc</span><span class="p">:</span> <span class="o">&lt;</span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">purl</span><span class="p">.</span><span class="n">org</span><span class="o">/</span><span class="n">dc</span><span class="o">/</span><span class="n">elements</span><span class="o">/</span>1<span class="p">.</span>1<span class="o">/&gt;</span>
+<span class="n">PREFIX</span> <span class="p">:</span> <span class="o">&lt;</span><span class="p">.</span><span class="o">&gt;</span>
 
-<span class="n">SELECT</span> <span class="p">?</span><span class="n">title</span>
+<span class="n">SELECT</span> ?<span class="n">title</span>
 <span class="p">{</span>
-  <span class="n">GRAPH</span> <span class="p">:</span><span class="n">ds</span><span class="o">-</span><span class="n">ng</span><span class="o">-</span><span class="mi">2</span><span class="o">.</span><span class="n">ttl</span>
-    <span class="p">{</span> <span class="p">?</span><span class="n">b</span> <span class="n">dc:title</span> <span class="p">?</span><span class="n">title</span> <span class="p">}</span>
+  <span class="n">GRAPH</span> <span class="p">:</span><span class="n">ds</span><span class="o">-</span><span class="n">ng</span><span class="o">-</span>2<span class="p">.</span><span class="n">ttl</span>
+    <span class="p">{</span> ?<span class="n">b</span> <span class="n">dc</span><span class="p">:</span><span class="n">title</span> ?<span class="n">title</span> <span class="p">}</span>
 <span class="p">}</span>
 </pre></div>
 
@@ -286,9 +285,9 @@ seja informado explicitamente via <code>
 <p>Resultados:</p>
 <div class="codehilite"><pre><span class="o">---------------------------------------------</span>
 <span class="o">|</span> <span class="n">title</span>                                     <span class="o">|</span>
-<span class="o">=============================================</span>
-<span class="o">|</span> <span class="s">&quot;Harry Potter and the Sorcerer&#39;s Stone&quot;</span>   <span class="o">|</span>
-<span class="o">|</span> <span class="s">&quot;Harry Potter and the Chamber of Secrets&quot;</span> <span class="o">|</span>
+<span class="o">============================================</span><span class="p">=</span>
+<span class="o">|</span> &quot;<span class="n">Harry</span> <span class="n">Potter</span> <span class="n">and</span> <span class="n">the</span> <span class="n">Sorcerer</span><span class="o">&#39;</span><span class="n">s</span> <span class="n">Stone</span>&quot;   <span class="o">|</span>
+<span class="o">|</span> &quot;<span class="n">Harry</span> <span class="n">Potter</span> <span class="n">and</span> <span class="n">the</span> <span class="n">Chamber</span> <span class="n">of</span> <span class="n">Secrets</span>&quot; <span class="o">|</span>
 <span class="o">---------------------------------------------</span>
 </pre></div>
 
@@ -299,15 +298,15 @@ O mesmo processo se aplica a variávei
 um padrão de grafo ou na forma  <code>GRAPH</code> form. A consulta abaixo
 (<a href="sparql_data/q-ds-4.rq">q-ds-4.rq</a>) seta uma condição nas variáveis 
 usadas para selecionar grafos nomeados, baseada na informação do grafo padrão.</p>
-<div class="codehilite"><pre><span class="n">PREFIX</span>  <span class="n">xsd:</span>    <span class="sr">&lt;http://www.w3.org/2001/XMLSchema#&gt;</span>
-<span class="n">PREFIX</span>  <span class="n">dc:</span>     <span class="sr">&lt;http://purl.org/dc/elements/1.1/&gt;</span>
-<span class="n">PREFIX</span>  <span class="p">:</span>       <span class="sr">&lt;.&gt;</span>
+<div class="codehilite"><pre><span class="n">PREFIX</span>  <span class="n">xsd</span><span class="p">:</span>    <span class="o">&lt;</span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">www</span><span class="p">.</span><span class="n">w3</span><span class="p">.</span><span class="n">org</span><span class="o">/</span>2001<span class="o">/</span><span class="n">XMLSchema</span>#<span class="o">&gt;</span>
+<span class="n">PREFIX</span>  <span class="n">dc</span><span class="p">:</span>     <span class="o">&lt;</span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">purl</span><span class="p">.</span><span class="n">org</span><span class="o">/</span><span class="n">dc</span><span class="o">/</span><span class="n">elements</span><span class="o">/</span>1<span class="p">.</span>1<span class="o">/&gt;</span>
+<span class="n">PREFIX</span>  <span class="p">:</span>       <span class="o">&lt;</span><span class="p">.</span><span class="o">&gt;</span>
 
-<span class="n">SELECT</span> <span class="p">?</span><span class="n">date</span> <span class="p">?</span><span class="n">title</span>
+<span class="n">SELECT</span> ?<span class="n">date</span> ?<span class="n">title</span>
 <span class="p">{</span>
-  <span class="p">?</span><span class="n">g</span> <span class="n">dc:date</span> <span class="p">?</span><span class="n">date</span> <span class="o">.</span> <span class="n">FILTER</span> <span class="p">(?</span><span class="n">date</span> <span class="o">&gt;</span> <span class="s">&quot;2005-08-01T00:00:00Z&quot;</span><span class="o">^^</span><span class="n">xsd:dateTime</span> <span class="p">)</span>
-  <span class="n">GRAPH</span> <span class="p">?</span><span class="n">g</span>
-      <span class="p">{</span> <span class="p">?</span><span class="n">b</span> <span class="n">dc:title</span> <span class="p">?</span><span class="n">title</span> <span class="p">}</span>
+  ?<span class="n">g</span> <span class="n">dc</span><span class="p">:</span><span class="n">date</span> ?<span class="n">date</span> <span class="p">.</span> <span class="n">FILTER</span> <span class="p">(</span>?<span class="n">date</span> <span class="o">&gt;</span> &quot;2005<span class="o">-</span>08<span class="o">-</span>01<span class="n">T00</span><span class="p">:</span>00<span class="p">:</span>00<span class="n">Z</span>&quot;^^<span class="n">xsd</span><span class="p">:</span><span class="n">dateTime</span> <span class="p">)</span>
+  <span class="n">GRAPH</span> ?<span class="n">g</span>
+      <span class="p">{</span> ?<span class="n">b</span> <span class="n">dc</span><span class="p">:</span><span class="n">title</span> ?<span class="n">title</span> <span class="p">}</span>
 <span class="p">}</span>
 </pre></div>
 
@@ -315,9 +314,9 @@ usadas para selecionar grafos nomeados, 
 <p>O resultado da consulta no dataset de exemplo são títulos em um dos grafos, o grafo com data anterior a 1 de agosto de 2005.</p>
 <div class="codehilite"><pre><span class="o">-----------------------------------------------------------------------------------------</span>
 <span class="o">|</span> <span class="n">date</span>                                      <span class="o">|</span> <span class="n">title</span>                                     <span class="o">|</span>
-<span class="o">=========================================================================================</span>
-<span class="o">|</span> <span class="s">&quot;2005-09-22T05:53:05+01:00&quot;</span><span class="o">^^</span><span class="n">xsd:dateTime</span> <span class="o">|</span> <span class="s">&quot;Harry Potter and the Sorcerer&#39;s Stone&quot;</span>   <span class="o">|</span>
-<span class="o">|</span> <span class="s">&quot;2005-09-22T05:53:05+01:00&quot;</span><span class="o">^^</span><span class="n">xsd:dateTime</span> <span class="o">|</span> <span class="s">&quot;Harry Potter and the Chamber of Secrets&quot;</span> <span class="o">|</span>
+<span class="o">========================================================================================</span><span class="p">=</span>
+<span class="o">|</span> &quot;2005<span class="o">-</span>09<span class="o">-</span>22<span class="n">T05</span><span class="p">:</span>53<span class="p">:</span>05<span class="o">+</span>01<span class="p">:</span>00&quot;^^<span class="n">xsd</span><span class="p">:</span><span class="n">dateTime</span> <span class="o">|</span> &quot;<span class="n">Harry</span> <span class="n">Potter</span> <span class="n">and</span> <span class="n">the</span> <span class="n">Sorcerer</span><span class="o">&#39;</span><span class="n">s</span> <span class="n">Stone</span>&quot;   <span class="o">|</span>
+<span class="o">|</span> &quot;2005<span class="o">-</span>09<span class="o">-</span>22<span class="n">T05</span><span class="p">:</span>53<span class="p">:</span>05<span class="o">+</span>01<span class="p">:</span>00&quot;^^<span class="n">xsd</span><span class="p">:</span><span class="n">dateTime</span> <span class="o">|</span> &quot;<span class="n">Harry</span> <span class="n">Potter</span> <span class="n">and</span> <span class="n">the</span> <span class="n">Chamber</span> <span class="n">of</span> <span class="n">Secrets</span>&quot; <span class="o">|</span>
 <span class="o">-----------------------------------------------------------------------------------------</span>
 </pre></div>
 
@@ -340,16 +339,16 @@ para os arquivos. Por exemplo, a consult
 e o dado ser lido de <code>file:local.rdf</code>. O nome do grafo vai ser &lt;http://example/data> como na consulta.</p>
 <p>Por exemplo, a consulta para buscar todas as triplas em ambos o grafo padrão e os grafos nomeados poderia ser escrita como
 (<a href="sparql_data/q-ds-5.rq">q-ds-5.rq</a>):</p>
-<div class="codehilite"><pre><span class="n">PREFIX</span> <span class="n">xsd:</span> <span class="sr">&lt;http://www.w3.org/2001/XMLSchema#&gt;</span>
-<span class="n">PREFIX</span> <span class="n">dc:</span>  <span class="sr">&lt;http://purl.org/dc/elements/1.1/&gt;</span>
-<span class="n">PREFIX</span> <span class="p">:</span>    <span class="sr">&lt;.&gt;</span>
+<div class="codehilite"><pre><span class="n">PREFIX</span> <span class="n">xsd</span><span class="p">:</span> <span class="o">&lt;</span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">www</span><span class="p">.</span><span class="n">w3</span><span class="p">.</span><span class="n">org</span><span class="o">/</span>2001<span class="o">/</span><span class="n">XMLSchema</span>#<span class="o">&gt;</span>
+<span class="n">PREFIX</span> <span class="n">dc</span><span class="p">:</span>  <span class="o">&lt;</span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">purl</span><span class="p">.</span><span class="n">org</span><span class="o">/</span><span class="n">dc</span><span class="o">/</span><span class="n">elements</span><span class="o">/</span>1<span class="p">.</span>1<span class="o">/&gt;</span>
+<span class="n">PREFIX</span> <span class="p">:</span>    <span class="o">&lt;</span><span class="p">.</span><span class="o">&gt;</span>
 
 <span class="n">SELECT</span> <span class="o">*</span>
-<span class="n">FROM</span>       <span class="sr">&lt;ds-dft.ttl&gt;</span>
-<span class="n">FROM</span> <span class="n">NAMED</span> <span class="sr">&lt;ds-ng-1.ttl&gt;</span>
-<span class="n">FROM</span> <span class="n">NAMED</span> <span class="sr">&lt;ds-ng-2.ttl&gt;</span>
+<span class="n">FROM</span>       <span class="o">&lt;</span><span class="n">ds</span><span class="o">-</span><span class="n">dft</span><span class="p">.</span><span class="n">ttl</span><span class="o">&gt;</span>
+<span class="n">FROM</span> <span class="n">NAMED</span> <span class="o">&lt;</span><span class="n">ds</span><span class="o">-</span><span class="n">ng</span><span class="o">-</span>1<span class="p">.</span><span class="n">ttl</span><span class="o">&gt;</span>
+<span class="n">FROM</span> <span class="n">NAMED</span> <span class="o">&lt;</span><span class="n">ds</span><span class="o">-</span><span class="n">ng</span><span class="o">-</span>2<span class="p">.</span><span class="n">ttl</span><span class="o">&gt;</span>
 <span class="p">{</span>
-   <span class="p">{</span> <span class="p">?</span><span class="n">s</span> <span class="p">?</span><span class="n">p</span> <span class="p">?</span><span class="n">o</span> <span class="p">}</span> <span class="n">UNION</span> <span class="p">{</span> <span class="n">GRAPH</span> <span class="p">?</span><span class="n">g</span> <span class="p">{</span> <span class="p">?</span><span class="n">s</span> <span class="p">?</span><span class="n">p</span> <span class="p">?</span><span class="n">o</span> <span class="p">}</span> <span class="p">}</span>
+   <span class="p">{</span> ?<span class="n">s</span> ?<span class="n">p</span> ?<span class="n">o</span> <span class="p">}</span> <span class="n">UNION</span> <span class="p">{</span> <span class="n">GRAPH</span> ?<span class="n">g</span> <span class="p">{</span> ?<span class="n">s</span> ?<span class="n">p</span> ?<span class="n">o</span> <span class="p">}</span> <span class="p">}</span>
 <span class="p">}</span>
 </pre></div>
 

Modified: websites/staging/jena/trunk/content/tutorials/sparql_filters.html
==============================================================================
--- websites/staging/jena/trunk/content/tutorials/sparql_filters.html (original)
+++ websites/staging/jena/trunk/content/tutorials/sparql_filters.html Thu Jun 20 10:18:34 2013
@@ -166,7 +166,7 @@ expressions.  This includes the abili
 tests, although the syntax of the regular expression is different
 from SQL.</p>
 <p>The syntax is:</p>
-<div class="codehilite"><pre><span class="n">FILTER</span> <span class="n">regex</span><span class="p">(?</span><span class="n">x</span><span class="p">,</span> <span class="s">&quot;pattern&quot;</span> <span class="p">[,</span> <span class="s">&quot;flags&quot;</span><span class="p">])</span>
+<div class="codehilite"><pre><span class="n">FILTER</span> <span class="n">regex</span><span class="p">(</span>?<span class="n">x</span><span class="p">,</span> &quot;<span class="n">pattern</span>&quot; <span class="p">[,</span> &quot;<span class="n">flags</span>&quot;<span class="p">])</span>
 </pre></div>
 
 
@@ -174,21 +174,21 @@ from SQL.</p>
 case-insensitive pattern match is done.</p>
 <p>The example query (<a href="sparql_data/q-f1.rq">q-f1.rq</a>) finds given names with an
 "r" or "R" in them.</p>
-<div class="codehilite"><pre><span class="n">PREFIX</span> <span class="n">vcard:</span> <span class="sr">&lt;http://www.w3.org/2001/vcard-rdf/3.0#&gt;</span>
+<div class="codehilite"><pre><span class="n">PREFIX</span> <span class="n">vcard</span><span class="p">:</span> <span class="o">&lt;</span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">www</span><span class="p">.</span><span class="n">w3</span><span class="p">.</span><span class="n">org</span><span class="o">/</span>2001<span class="o">/</span><span class="n">vcard</span><span class="o">-</span><span class="n">rdf</span><span class="o">/</span>3<span class="p">.</span>0#<span class="o">&gt;</span>
 
-<span class="n">SELECT</span> <span class="p">?</span><span class="n">g</span>
+<span class="n">SELECT</span> ?<span class="n">g</span>
 <span class="n">WHERE</span>
-<span class="p">{</span> <span class="p">?</span><span class="n">y</span> <span class="n">vcard:Given</span> <span class="p">?</span><span class="n">g</span> <span class="o">.</span>
-  <span class="n">FILTER</span> <span class="n">regex</span><span class="p">(?</span><span class="n">g</span><span class="p">,</span> <span class="s">&quot;r&quot;</span><span class="p">,</span> <span class="s">&quot;i&quot;</span><span class="p">)</span> <span class="p">}</span>
+<span class="p">{</span> ?<span class="n">y</span> <span class="n">vcard</span><span class="p">:</span><span class="n">Given</span> ?<span class="n">g</span> <span class="p">.</span>
+  <span class="n">FILTER</span> <span class="n">regex</span><span class="p">(</span>?<span class="n">g</span><span class="p">,</span> &quot;<span class="n">r</span>&quot;<span class="p">,</span> &quot;<span class="nb">i</span>&quot;<span class="p">)</span> <span class="p">}</span>
 </pre></div>
 
 
 <p>with the results:</p>
 <div class="codehilite"><pre><span class="o">-------------</span>
 <span class="o">|</span> <span class="n">g</span>         <span class="o">|</span>
-<span class="o">=============</span>
-<span class="o">|</span> <span class="s">&quot;Rebecca&quot;</span> <span class="o">|</span>
-<span class="o">|</span> <span class="s">&quot;Sarah&quot;</span>   <span class="o">|</span>
+<span class="o">============</span><span class="p">=</span>
+<span class="o">|</span> &quot;<span class="n">Rebecca</span>&quot; <span class="o">|</span>
+<span class="o">|</span> &quot;<span class="n">Sarah</span>&quot;   <span class="o">|</span>
 <span class="o">-------------</span>
 </pre></div>
 
@@ -206,23 +206,23 @@ information because URIs are unique. 
 property value is typed.</p>
 <p>In this extract of the data, we show the typed value. It can also
 be written plain 23.</p>
-<div class="codehilite"><pre><span class="sr">&lt;http://somewhere/RebeccaSmith/&gt;</span>
-    <span class="n">info:age</span> <span class="s">&quot;23&quot;</span><span class="o">^^</span><span class="n">xsd:integer</span> <span class="p">;</span>
-    <span class="n">vCard:FN</span> <span class="s">&quot;Becky Smith&quot;</span> <span class="p">;</span>
-    <span class="n">vCard:N</span> <span class="p">[</span> <span class="n">vCard:Family</span> <span class="s">&quot;Smith&quot;</span> <span class="p">;</span>
-              <span class="n">vCard:Given</span>  <span class="s">&quot;Rebecca&quot;</span> <span class="p">]</span> <span class="o">.</span>
+<div class="codehilite"><pre><span class="o">&lt;</span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">somewhere</span><span class="o">/</span><span class="n">RebeccaSmith</span><span class="o">/&gt;</span>
+    <span class="n">info</span><span class="p">:</span><span class="n">age</span> &quot;23&quot;^^<span class="n">xsd</span><span class="p">:</span><span class="n">integer</span> <span class="p">;</span>
+    <span class="n">vCard</span><span class="p">:</span><span class="n">FN</span> &quot;<span class="n">Becky</span> <span class="n">Smith</span>&quot; <span class="p">;</span>
+    <span class="n">vCard</span><span class="p">:</span><span class="n">N</span> <span class="p">[</span> <span class="n">vCard</span><span class="p">:</span><span class="n">Family</span> &quot;<span class="n">Smith</span>&quot; <span class="p">;</span>
+              <span class="n">vCard</span><span class="p">:</span><span class="n">Given</span>  &quot;<span class="n">Rebecca</span>&quot; <span class="p">]</span> <span class="p">.</span>
 </pre></div>
 
 
 <p>So, a query (<a href="sparql_data/q-f2.rq">q-f2.rq</a>) to find the names of people who
 are older than 24 is:</p>
-<div class="codehilite"><pre><span class="n">PREFIX</span> <span class="n">info:</span> <span class="sr">&lt;http://somewhere/peopleInfo#&gt;</span>
+<div class="codehilite"><pre><span class="n">PREFIX</span> <span class="n">info</span><span class="p">:</span> <span class="o">&lt;</span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">somewhere</span><span class="o">/</span><span class="n">peopleInfo</span>#<span class="o">&gt;</span>
 
-<span class="n">SELECT</span> <span class="p">?</span><span class="n">resource</span>
+<span class="n">SELECT</span> ?<span class="n">resource</span>
 <span class="n">WHERE</span>
   <span class="p">{</span>
-    <span class="p">?</span><span class="n">resource</span> <span class="n">info:age</span> <span class="p">?</span><span class="n">age</span> <span class="o">.</span>
-    <span class="n">FILTER</span> <span class="p">(?</span><span class="n">age</span> <span class="o">&gt;=</span> <span class="mi">24</span><span class="p">)</span>
+    ?<span class="n">resource</span> <span class="n">info</span><span class="p">:</span><span class="n">age</span> ?<span class="n">age</span> <span class="p">.</span>
+    <span class="n">FILTER</span> <span class="p">(</span>?<span class="n">age</span> <span class="o">&gt;</span><span class="p">=</span> 24<span class="p">)</span>
   <span class="p">}</span>
 </pre></div>
 
@@ -231,8 +231,8 @@ are older than 24 is:</p>
 The only solution is:</p>
 <div class="codehilite"><pre><span class="o">---------------------------------</span>
 <span class="o">|</span> <span class="n">resource</span>                      <span class="o">|</span>
-<span class="o">=================================</span>
-<span class="o">|</span> <span class="sr">&lt;http://somewhere/JohnSmith/&gt;</span> <span class="o">|</span>
+<span class="o">================================</span><span class="p">=</span>
+<span class="o">|</span> <span class="o">&lt;</span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">somewhere</span><span class="o">/</span><span class="n">JohnSmith</span><span class="o">/&gt;</span> <span class="o">|</span>
 <span class="o">---------------------------------</span>
 </pre></div>
 

Modified: websites/staging/jena/trunk/content/tutorials/sparql_filters_pt.html
==============================================================================
--- websites/staging/jena/trunk/content/tutorials/sparql_filters_pt.html (original)
+++ websites/staging/jena/trunk/content/tutorials/sparql_filters_pt.html Thu Jun 20 10:18:34 2013
@@ -160,27 +160,27 @@
 <h2 id="casamento-de-strings">Casamento de Strings</h2>
 <p>SPARQL fornece uma operação para testar strings, baseada em expressões regulares. Isso inclui a habilidade de testes como SQL "LIKE", no entanto, a sintaxe de expressões regulares é diferente de SQL.</p>
 <p>A sintaxe é:</p>
-<div class="codehilite"><pre><span class="n">FILTER</span> <span class="n">regex</span><span class="p">(?</span><span class="n">x</span><span class="p">,</span> <span class="s">&quot;pattern&quot;</span> <span class="p">[,</span> <span class="s">&quot;flags&quot;</span><span class="p">])</span>
+<div class="codehilite"><pre><span class="n">FILTER</span> <span class="n">regex</span><span class="p">(</span>?<span class="n">x</span><span class="p">,</span> &quot;<span class="n">pattern</span>&quot; <span class="p">[,</span> &quot;<span class="n">flags</span>&quot;<span class="p">])</span>
 </pre></div>
 
 
 <p>O argumento flags é opcional. A flag "i" significa casamento de padrão case-insensitivo.</p>
 <p>A consulta (<a href="sparql_data/q-f1.rq">q-f1.rq</a>) procura nomes com um “r” ou “R” neles.</p>
-<div class="codehilite"><pre><span class="n">PREFIX</span> <span class="n">vcard:</span> <span class="sr">&lt;http://www.w3.org/2001/vcard-rdf/3.0#&gt;</span>
+<div class="codehilite"><pre><span class="n">PREFIX</span> <span class="n">vcard</span><span class="p">:</span> <span class="o">&lt;</span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">www</span><span class="p">.</span><span class="n">w3</span><span class="p">.</span><span class="n">org</span><span class="o">/</span>2001<span class="o">/</span><span class="n">vcard</span><span class="o">-</span><span class="n">rdf</span><span class="o">/</span>3<span class="p">.</span>0#<span class="o">&gt;</span>
 
-<span class="n">SELECT</span> <span class="p">?</span><span class="n">g</span>
+<span class="n">SELECT</span> ?<span class="n">g</span>
 <span class="n">WHERE</span>
-<span class="p">{</span> <span class="p">?</span><span class="n">y</span> <span class="n">vcard:Given</span> <span class="p">?</span><span class="n">g</span> <span class="o">.</span>
-  <span class="n">FILTER</span> <span class="n">regex</span><span class="p">(?</span><span class="n">g</span><span class="p">,</span> <span class="s">&quot;r&quot;</span><span class="p">,</span> <span class="s">&quot;i&quot;</span><span class="p">)</span> <span class="p">}</span>
+<span class="p">{</span> ?<span class="n">y</span> <span class="n">vcard</span><span class="p">:</span><span class="n">Given</span> ?<span class="n">g</span> <span class="p">.</span>
+  <span class="n">FILTER</span> <span class="n">regex</span><span class="p">(</span>?<span class="n">g</span><span class="p">,</span> &quot;<span class="n">r</span>&quot;<span class="p">,</span> &quot;<span class="nb">i</span>&quot;<span class="p">)</span> <span class="p">}</span>
 </pre></div>
 
 
 <p>resultados:</p>
 <div class="codehilite"><pre><span class="o">-------------</span>
 <span class="o">|</span> <span class="n">g</span>         <span class="o">|</span>
-<span class="o">=============</span>
-<span class="o">|</span> <span class="s">&quot;Rebecca&quot;</span> <span class="o">|</span>
-<span class="o">|</span> <span class="s">&quot;Sarah&quot;</span>   <span class="o">|</span>
+<span class="o">============</span><span class="p">=</span>
+<span class="o">|</span> &quot;<span class="n">Rebecca</span>&quot; <span class="o">|</span>
+<span class="o">|</span> &quot;<span class="n">Sarah</span>&quot;   <span class="o">|</span>
 <span class="o">-------------</span>
 </pre></div>
 
@@ -191,22 +191,22 @@
 <h2 id="testando-valores">Testando valores</h2>
 <p>Muitas vezes, a aplicação necessita filtrar com o valor de uma variável. No arquivo <a href="sparql_data/vc-db-2.rdf">vc-db-2.rdf</a>, nós adicionamos um campo extra para idade. Idade não é definida no esquema de vcard então tivemos que criar uma nova propriedade para usar neste tutorial. RDF permite a mistura de diferentes definições de informação porque URIs são únicas. Note também que a propriedade info:age é tipada.</p>
 <p>Nesse pedaço de dado, nós mostramos o valor tipado.</p>
-<div class="codehilite"><pre><span class="sr">&lt;http://somewhere/RebeccaSmith/&gt;</span>
-    <span class="n">info:age</span> <span class="s">&quot;23&quot;</span><span class="o">^^</span><span class="n">xsd:integer</span> <span class="p">;</span>
-    <span class="n">vCard:FN</span> <span class="s">&quot;Becky Smith&quot;</span> <span class="p">;</span>
-    <span class="n">vCard:N</span> <span class="p">[</span> <span class="n">vCard:Family</span> <span class="s">&quot;Smith&quot;</span> <span class="p">;</span>
-              <span class="n">vCard:Given</span>  <span class="s">&quot;Rebecca&quot;</span> <span class="p">]</span> <span class="o">.</span>
+<div class="codehilite"><pre><span class="o">&lt;</span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">somewhere</span><span class="o">/</span><span class="n">RebeccaSmith</span><span class="o">/&gt;</span>
+    <span class="n">info</span><span class="p">:</span><span class="n">age</span> &quot;23&quot;^^<span class="n">xsd</span><span class="p">:</span><span class="n">integer</span> <span class="p">;</span>
+    <span class="n">vCard</span><span class="p">:</span><span class="n">FN</span> &quot;<span class="n">Becky</span> <span class="n">Smith</span>&quot; <span class="p">;</span>
+    <span class="n">vCard</span><span class="p">:</span><span class="n">N</span> <span class="p">[</span> <span class="n">vCard</span><span class="p">:</span><span class="n">Family</span> &quot;<span class="n">Smith</span>&quot; <span class="p">;</span>
+              <span class="n">vCard</span><span class="p">:</span><span class="n">Given</span>  &quot;<span class="n">Rebecca</span>&quot; <span class="p">]</span> <span class="p">.</span>
 </pre></div>
 
 
 <p>Então a consulta (<a href="sparql_data/q-f2.rq">q-f2.rq</a>) para procurar as pessoas mais velhas que 24 anos é:</p>
-<div class="codehilite"><pre><span class="n">PREFIX</span> <span class="n">info:</span> <span class="sr">&lt;http://somewhere/peopleInfo#&gt;</span>
+<div class="codehilite"><pre><span class="n">PREFIX</span> <span class="n">info</span><span class="p">:</span> <span class="o">&lt;</span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">somewhere</span><span class="o">/</span><span class="n">peopleInfo</span>#<span class="o">&gt;</span>
 
-<span class="n">SELECT</span> <span class="p">?</span><span class="n">resource</span>
+<span class="n">SELECT</span> ?<span class="n">resource</span>
 <span class="n">WHERE</span>
   <span class="p">{</span>
-    <span class="p">?</span><span class="n">resource</span> <span class="n">info:age</span> <span class="p">?</span><span class="n">age</span> <span class="o">.</span>
-    <span class="n">FILTER</span> <span class="p">(?</span><span class="n">age</span> <span class="o">&gt;=</span> <span class="mi">24</span><span class="p">)</span>
+    ?<span class="n">resource</span> <span class="n">info</span><span class="p">:</span><span class="n">age</span> ?<span class="n">age</span> <span class="p">.</span>
+    <span class="n">FILTER</span> <span class="p">(</span>?<span class="n">age</span> <span class="o">&gt;</span><span class="p">=</span> 24<span class="p">)</span>
   <span class="p">}</span>
 </pre></div>
 
@@ -214,8 +214,8 @@
 <p>A expressão aritmética precisa estar em parêntesis. A única solução é:</p>
 <div class="codehilite"><pre><span class="o">---------------------------------</span>
 <span class="o">|</span> <span class="n">resource</span>                      <span class="o">|</span>
-<span class="o">=================================</span>
-<span class="o">|</span> <span class="sr">&lt;http://somewhere/JohnSmith/&gt;</span> <span class="o">|</span>
+<span class="o">================================</span><span class="p">=</span>
+<span class="o">|</span> <span class="o">&lt;</span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">somewhere</span><span class="o">/</span><span class="n">JohnSmith</span><span class="o">/&gt;</span> <span class="o">|</span>
 <span class="o">---------------------------------</span>
 </pre></div>
 

Modified: websites/staging/jena/trunk/content/tutorials/sparql_optionals.html
==============================================================================
--- websites/staging/jena/trunk/content/tutorials/sparql_optionals.html (original)
+++ websites/staging/jena/trunk/content/tutorials/sparql_optionals.html Thu Jun 20 10:18:34 2013
@@ -164,14 +164,14 @@ anyway.</p>
 <h2 id="optionals">OPTIONALs</h2>
 <p>This query (<a href="sparql_data/q-opt1.rq">q-opt1.rq</a>) gets the name of a person and
 also their age if that piece of information is available.</p>
-<div class="codehilite"><pre><span class="n">PREFIX</span> <span class="n">info:</span>    <span class="sr">&lt;http://somewhere/peopleInfo#&gt;</span>
-<span class="n">PREFIX</span> <span class="n">vcard:</span>   <span class="sr">&lt;http://www.w3.org/2001/vcard-rdf/3.0#&gt;</span>
+<div class="codehilite"><pre><span class="n">PREFIX</span> <span class="n">info</span><span class="p">:</span>    <span class="o">&lt;</span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">somewhere</span><span class="o">/</span><span class="n">peopleInfo</span>#<span class="o">&gt;</span>
+<span class="n">PREFIX</span> <span class="n">vcard</span><span class="p">:</span>   <span class="o">&lt;</span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">www</span><span class="p">.</span><span class="n">w3</span><span class="p">.</span><span class="n">org</span><span class="o">/</span>2001<span class="o">/</span><span class="n">vcard</span><span class="o">-</span><span class="n">rdf</span><span class="o">/</span>3<span class="p">.</span>0#<span class="o">&gt;</span>
 
-<span class="n">SELECT</span> <span class="p">?</span><span class="n">name</span> <span class="p">?</span><span class="n">age</span>
+<span class="n">SELECT</span> ?<span class="n">name</span> ?<span class="n">age</span>
 <span class="n">WHERE</span>
 <span class="p">{</span>
-    <span class="p">?</span><span class="n">person</span> <span class="n">vcard:FN</span>  <span class="p">?</span><span class="n">name</span> <span class="o">.</span>
-    <span class="n">OPTIONAL</span> <span class="p">{</span> <span class="p">?</span><span class="n">person</span> <span class="n">info:age</span> <span class="p">?</span><span class="n">age</span> <span class="p">}</span>
+    ?<span class="n">person</span> <span class="n">vcard</span><span class="p">:</span><span class="n">FN</span>  ?<span class="n">name</span> <span class="p">.</span>
+    <span class="n">OPTIONAL</span> <span class="p">{</span> ?<span class="n">person</span> <span class="n">info</span><span class="p">:</span><span class="n">age</span> ?<span class="n">age</span> <span class="p">}</span>
 <span class="p">}</span>
 </pre></div>
 
@@ -183,11 +183,11 @@ optional, there is a pattern solution fo
 age information.</p>
 <div class="codehilite"><pre><span class="o">------------------------</span>
 <span class="o">|</span> <span class="n">name</span>          <span class="o">|</span> <span class="n">age</span> <span class="o">|</span>
-<span class="o">=======================</span>
-<span class="o">|</span> <span class="s">&quot;Becky Smith&quot;</span> <span class="o">|</span> <span class="mi">23</span>  <span class="o">|</span>
-<span class="o">|</span> <span class="s">&quot;Sarah Jones&quot;</span> <span class="o">|</span>     <span class="o">|</span>
-<span class="o">|</span> <span class="s">&quot;John Smith&quot;</span>  <span class="o">|</span> <span class="mi">25</span>  <span class="o">|</span>
-<span class="o">|</span> <span class="s">&quot;Matt Jones&quot;</span>  <span class="o">|</span>     <span class="o">|</span>
+<span class="o">======================</span><span class="p">=</span>
+<span class="o">|</span> &quot;<span class="n">Becky</span> <span class="n">Smith</span>&quot; <span class="o">|</span> 23  <span class="o">|</span>
+<span class="o">|</span> &quot;<span class="n">Sarah</span> <span class="n">Jones</span>&quot; <span class="o">|</span>     <span class="o">|</span>
+<span class="o">|</span> &quot;<span class="n">John</span> <span class="n">Smith</span>&quot;  <span class="o">|</span> 25  <span class="o">|</span>
+<span class="o">|</span> &quot;<span class="n">Matt</span> <span class="n">Jones</span>&quot;  <span class="o">|</span>     <span class="o">|</span>
 <span class="o">-----------------------</span>
 </pre></div>
 
@@ -196,14 +196,14 @@ age information.</p>
 have been retrieved. If the triple pattern had been included but
 not optional then we would have the query
 (<a href="sparql_data/q-opt2.rq">q-opt2.rq</a>):</p>
-<div class="codehilite"><pre><span class="n">PREFIX</span> <span class="n">info:</span>   <span class="sr">&lt;http://somewhere/peopleInfo#&gt;</span>
-<span class="n">PREFIX</span> <span class="n">vcard:</span>  <span class="sr">&lt;http://www.w3.org/2001/vcard-rdf/3.0#&gt;</span>
+<div class="codehilite"><pre><span class="n">PREFIX</span> <span class="n">info</span><span class="p">:</span>   <span class="o">&lt;</span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">somewhere</span><span class="o">/</span><span class="n">peopleInfo</span>#<span class="o">&gt;</span>
+<span class="n">PREFIX</span> <span class="n">vcard</span><span class="p">:</span>  <span class="o">&lt;</span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">www</span><span class="p">.</span><span class="n">w3</span><span class="p">.</span><span class="n">org</span><span class="o">/</span>2001<span class="o">/</span><span class="n">vcard</span><span class="o">-</span><span class="n">rdf</span><span class="o">/</span>3<span class="p">.</span>0#<span class="o">&gt;</span>
 
-<span class="n">SELECT</span> <span class="p">?</span><span class="n">name</span> <span class="p">?</span><span class="n">age</span>
+<span class="n">SELECT</span> ?<span class="n">name</span> ?<span class="n">age</span>
 <span class="n">WHERE</span>
 <span class="p">{</span>
-    <span class="p">?</span><span class="n">person</span> <span class="n">vcard:FN</span>  <span class="p">?</span><span class="n">name</span> <span class="o">.</span>
-    <span class="p">?</span><span class="n">person</span> <span class="n">info:age</span> <span class="p">?</span><span class="n">age</span> <span class="o">.</span>
+    ?<span class="n">person</span> <span class="n">vcard</span><span class="p">:</span><span class="n">FN</span>  ?<span class="n">name</span> <span class="p">.</span>
+    ?<span class="n">person</span> <span class="n">info</span><span class="p">:</span><span class="n">age</span> ?<span class="n">age</span> <span class="p">.</span>
 <span class="p">}</span>
 </pre></div>
 
@@ -211,9 +211,9 @@ not optional then we would have the quer
 <p>with only two solutions:</p>
 <div class="codehilite"><pre><span class="o">-----------------------</span>
 <span class="o">|</span> <span class="n">name</span>          <span class="o">|</span> <span class="n">age</span> <span class="o">|</span>
-<span class="o">=======================</span>
-<span class="o">|</span> <span class="s">&quot;Becky Smith&quot;</span> <span class="o">|</span> <span class="mi">23</span>  <span class="o">|</span>
-<span class="o">|</span> <span class="s">&quot;John Smith&quot;</span>  <span class="o">|</span> <span class="mi">25</span>  <span class="o">|</span>
+<span class="o">======================</span><span class="p">=</span>
+<span class="o">|</span> &quot;<span class="n">Becky</span> <span class="n">Smith</span>&quot; <span class="o">|</span> 23  <span class="o">|</span>
+<span class="o">|</span> &quot;<span class="n">John</span> <span class="n">Smith</span>&quot;  <span class="o">|</span> 25  <span class="o">|</span>
 <span class="o">-----------------------</span>
 </pre></div>
 
@@ -225,14 +225,14 @@ The optional pattern is any group patter
 SPARQL pattern types.  If the group matches, the solution is
 extended, if not, the original solution is given
 (<a href="sparql_data/q-opt3.rq">q-opt-3.rq</a>).</p>
-<div class="codehilite"><pre><span class="n">PREFIX</span> <span class="n">info:</span>        <span class="sr">&lt;http://somewhere/peopleInfo#&gt;</span>
-<span class="n">PREFIX</span> <span class="n">vcard:</span>      <span class="sr">&lt;http://www.w3.org/2001/vcard-rdf/3.0#&gt;</span>
+<div class="codehilite"><pre><span class="n">PREFIX</span> <span class="n">info</span><span class="p">:</span>        <span class="o">&lt;</span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">somewhere</span><span class="o">/</span><span class="n">peopleInfo</span>#<span class="o">&gt;</span>
+<span class="n">PREFIX</span> <span class="n">vcard</span><span class="p">:</span>      <span class="o">&lt;</span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">www</span><span class="p">.</span><span class="n">w3</span><span class="p">.</span><span class="n">org</span><span class="o">/</span>2001<span class="o">/</span><span class="n">vcard</span><span class="o">-</span><span class="n">rdf</span><span class="o">/</span>3<span class="p">.</span>0#<span class="o">&gt;</span>
 
-<span class="n">SELECT</span> <span class="p">?</span><span class="n">name</span> <span class="p">?</span><span class="n">age</span>
+<span class="n">SELECT</span> ?<span class="n">name</span> ?<span class="n">age</span>
 <span class="n">WHERE</span>
 <span class="p">{</span>
-    <span class="p">?</span><span class="n">person</span> <span class="n">vcard:FN</span>  <span class="p">?</span><span class="n">name</span> <span class="o">.</span>
-    <span class="n">OPTIONAL</span> <span class="p">{</span> <span class="p">?</span><span class="n">person</span> <span class="n">info:age</span> <span class="p">?</span><span class="n">age</span> <span class="o">.</span> <span class="n">FILTER</span> <span class="p">(</span> <span class="p">?</span><span class="n">age</span> <span class="o">&gt;</span> <span class="mi">24</span> <span class="p">)</span> <span class="p">}</span>
+    ?<span class="n">person</span> <span class="n">vcard</span><span class="p">:</span><span class="n">FN</span>  ?<span class="n">name</span> <span class="p">.</span>
+    <span class="n">OPTIONAL</span> <span class="p">{</span> ?<span class="n">person</span> <span class="n">info</span><span class="p">:</span><span class="n">age</span> ?<span class="n">age</span> <span class="p">.</span> <span class="n">FILTER</span> <span class="p">(</span> ?<span class="n">age</span> <span class="o">&gt;</span> 24 <span class="p">)</span> <span class="p">}</span>
 <span class="p">}</span>
 </pre></div>
 
@@ -242,11 +242,11 @@ will still get 4 solutions (from the <co
 get ages if they pass the test.</p>
 <div class="codehilite"><pre><span class="o">-----------------------</span>
 <span class="o">|</span> <span class="n">name</span>          <span class="o">|</span> <span class="n">age</span> <span class="o">|</span>
-<span class="o">=======================</span>
-<span class="o">|</span> <span class="s">&quot;Becky Smith&quot;</span> <span class="o">|</span>     <span class="o">|</span>
-<span class="o">|</span> <span class="s">&quot;Sarah Jones&quot;</span> <span class="o">|</span>     <span class="o">|</span>
-<span class="o">|</span> <span class="s">&quot;John Smith&quot;</span>  <span class="o">|</span> <span class="mi">25</span>  <span class="o">|</span>
-<span class="o">|</span> <span class="s">&quot;Matt Jones&quot;</span>  <span class="o">|</span>     <span class="o">|</span>
+<span class="o">======================</span><span class="p">=</span>
+<span class="o">|</span> &quot;<span class="n">Becky</span> <span class="n">Smith</span>&quot; <span class="o">|</span>     <span class="o">|</span>
+<span class="o">|</span> &quot;<span class="n">Sarah</span> <span class="n">Jones</span>&quot; <span class="o">|</span>     <span class="o">|</span>
+<span class="o">|</span> &quot;<span class="n">John</span> <span class="n">Smith</span>&quot;  <span class="o">|</span> 25  <span class="o">|</span>
+<span class="o">|</span> &quot;<span class="n">Matt</span> <span class="n">Jones</span>&quot;  <span class="o">|</span>     <span class="o">|</span>
 <span class="o">-----------------------</span>
 </pre></div>
 
@@ -256,15 +256,15 @@ get ages if they pass the test.</p>
 can influence the number of solutions but it may be necessary to
 make the filter more complicated to allow for variable <code>age</code> being
 unbound (<a href="sparql_data/q-opt4.rq">q-opt4.rq</a>).</p>
-<div class="codehilite"><pre><span class="n">PREFIX</span> <span class="n">info:</span>        <span class="sr">&lt;http://somewhere/peopleInfo#&gt;</span>
-<span class="n">PREFIX</span> <span class="n">vcard:</span>      <span class="sr">&lt;http://www.w3.org/2001/vcard-rdf/3.0#&gt;</span>
+<div class="codehilite"><pre><span class="n">PREFIX</span> <span class="n">info</span><span class="p">:</span>        <span class="o">&lt;</span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">somewhere</span><span class="o">/</span><span class="n">peopleInfo</span>#<span class="o">&gt;</span>
+<span class="n">PREFIX</span> <span class="n">vcard</span><span class="p">:</span>      <span class="o">&lt;</span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">www</span><span class="p">.</span><span class="n">w3</span><span class="p">.</span><span class="n">org</span><span class="o">/</span>2001<span class="o">/</span><span class="n">vcard</span><span class="o">-</span><span class="n">rdf</span><span class="o">/</span>3<span class="p">.</span>0#<span class="o">&gt;</span>
 
-<span class="n">SELECT</span> <span class="p">?</span><span class="n">name</span> <span class="p">?</span><span class="n">age</span>
+<span class="n">SELECT</span> ?<span class="n">name</span> ?<span class="n">age</span>
 <span class="n">WHERE</span>
 <span class="p">{</span>
-    <span class="p">?</span><span class="n">person</span> <span class="n">vcard:FN</span>  <span class="p">?</span><span class="n">name</span> <span class="o">.</span>
-    <span class="n">OPTIONAL</span> <span class="p">{</span> <span class="p">?</span><span class="n">person</span> <span class="n">info:age</span> <span class="p">?</span><span class="n">age</span> <span class="o">.</span> <span class="p">}</span>
-    <span class="n">FILTER</span> <span class="p">(</span> <span class="o">!</span><span class="n">bound</span><span class="p">(?</span><span class="n">age</span><span class="p">)</span> <span class="o">||</span> <span class="p">?</span><span class="n">age</span> <span class="o">&gt;</span> <span class="mi">24</span> <span class="p">)</span>
+    ?<span class="n">person</span> <span class="n">vcard</span><span class="p">:</span><span class="n">FN</span>  ?<span class="n">name</span> <span class="p">.</span>
+    <span class="n">OPTIONAL</span> <span class="p">{</span> ?<span class="n">person</span> <span class="n">info</span><span class="p">:</span><span class="n">age</span> ?<span class="n">age</span> <span class="p">.</span> <span class="p">}</span>
+    <span class="n">FILTER</span> <span class="p">(</span> !<span class="n">bound</span><span class="p">(</span>?<span class="n">age</span><span class="p">)</span> <span class="o">||</span> ?<span class="n">age</span> <span class="o">&gt;</span> 24 <span class="p">)</span>
 <span class="p">}</span>
 </pre></div>
 
@@ -273,10 +273,10 @@ unbound (<a href="sparql_data/q-opt4.rq"
 24. It can also be unbound.  There are now three solutions:</p>
 <div class="codehilite"><pre><span class="o">-----------------------</span>
 <span class="o">|</span> <span class="n">name</span>          <span class="o">|</span> <span class="n">age</span> <span class="o">|</span>
-<span class="o">=======================</span>
-<span class="o">|</span> <span class="s">&quot;Sarah Jones&quot;</span> <span class="o">|</span>     <span class="o">|</span>
-<span class="o">|</span> <span class="s">&quot;John Smith&quot;</span>  <span class="o">|</span> <span class="mi">25</span>  <span class="o">|</span>
-<span class="o">|</span> <span class="s">&quot;Matt Jones&quot;</span>  <span class="o">|</span>     <span class="o">|</span>
+<span class="o">======================</span><span class="p">=</span>
+<span class="o">|</span> &quot;<span class="n">Sarah</span> <span class="n">Jones</span>&quot; <span class="o">|</span>     <span class="o">|</span>
+<span class="o">|</span> &quot;<span class="n">John</span> <span class="n">Smith</span>&quot;  <span class="o">|</span> 25  <span class="o">|</span>
+<span class="o">|</span> &quot;<span class="n">Matt</span> <span class="n">Jones</span>&quot;  <span class="o">|</span>     <span class="o">|</span>
 <span class="o">-----------------------</span>
 </pre></div>
 
@@ -287,15 +287,15 @@ expression fails.</p>
 <h2 id="optionals-and-order-dependent-queries">OPTIONALs and Order Dependent Queries</h2>
 <p>One thing to be careful of is using the same variable in two or
 more optional clauses (and not in some basic pattern as well):</p>
-<div class="codehilite"><pre><span class="n">PREFIX</span> <span class="n">foaf:</span> <span class="sr">&lt;http://xmlns.com/foaf/0.1/&gt;</span>
-<span class="n">PREFIX</span> <span class="n">vCard:</span> <span class="sr">&lt;http://www.w3.org/2001/vcard-rdf/3.0#&gt;</span>
+<div class="codehilite"><pre><span class="n">PREFIX</span> <span class="n">foaf</span><span class="p">:</span> <span class="o">&lt;</span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">xmlns</span><span class="p">.</span><span class="n">com</span><span class="o">/</span><span class="n">foaf</span><span class="o">/</span>0<span class="p">.</span>1<span class="o">/&gt;</span>
+<span class="n">PREFIX</span> <span class="n">vCard</span><span class="p">:</span> <span class="o">&lt;</span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">www</span><span class="p">.</span><span class="n">w3</span><span class="p">.</span><span class="n">org</span><span class="o">/</span>2001<span class="o">/</span><span class="n">vcard</span><span class="o">-</span><span class="n">rdf</span><span class="o">/</span>3<span class="p">.</span>0#<span class="o">&gt;</span>
 
-<span class="n">SELECT</span> <span class="p">?</span><span class="n">name</span>
+<span class="n">SELECT</span> ?<span class="n">name</span>
 <span class="n">WHERE</span>
 <span class="p">{</span>
-  <span class="p">?</span><span class="n">x</span> <span class="n">a</span> <span class="n">foaf:Person</span> <span class="o">.</span>
-  <span class="n">OPTIONAL</span> <span class="p">{</span> <span class="p">?</span><span class="n">x</span> <span class="n">foaf:name</span> <span class="p">?</span><span class="n">name</span> <span class="p">}</span>
-  <span class="n">OPTIONAL</span> <span class="p">{</span> <span class="p">?</span><span class="n">x</span> <span class="n">vCard:FN</span>  <span class="p">?</span><span class="n">name</span> <span class="p">}</span>
+  ?<span class="n">x</span> <span class="n">a</span> <span class="n">foaf</span><span class="p">:</span><span class="n">Person</span> <span class="p">.</span>
+  <span class="n">OPTIONAL</span> <span class="p">{</span> ?<span class="n">x</span> <span class="n">foaf</span><span class="p">:</span><span class="n">name</span> ?<span class="n">name</span> <span class="p">}</span>
+  <span class="n">OPTIONAL</span> <span class="p">{</span> ?<span class="n">x</span> <span class="n">vCard</span><span class="p">:</span><span class="n">FN</span>  ?<span class="n">name</span> <span class="p">}</span>
 <span class="p">}</span>
 </pre></div>
 



Mime
View raw message