<docbook><section><title>VirtTipsAndTricksSplitURLEncodedSeparatedList</title><title>How to split a urlencoded  &quot;;-&quot; separated list of urls in a SPARQL query?</title>How to split a urlencoded  &quot;;-&quot; separated list of urls in a SPARQL query?
<orderedlist spacing="compact"><listitem>Assume the following string: <span style="color: red">
      UNKNOWN tag:
      http://www.w3.org/1999/xhtml:verbartim &quot;http://example.org/test1;http://example.org/test2&quot;.
</span> </listitem>
<listitem>In order to split the given string into two values i.e.
  <ulink url="http://example.org/test1">http://example.org/test1</ulink>  and  <ulink url="http://example.org/test2">http://example.org/test2</ulink>  , one should use the Virtuoso function <ulink url="http://docs.openlinksw.com/virtuoso/fn_split_and_decode.html">split_and_decode()</ulink> which returns an array.
Thus the Virtuoso function <ulink url="http://docs.openlinksw.com/virtuoso/fn_aref.html">aref()</ulink> also needs to be used for loading the elements.
</listitem>
<listitem>Example: <programlisting>SELECT bif:aref (bif:split_and_decode(&#39;http%3A%2F%2Fexample.org%2Ftest1%3Bhttp%3A%2F%2Fexample.org%2Ftest2&#39;,0), 0) 
{ ?S ?P ?O } 
LIMIT 1
</programlisting></listitem>
</orderedlist><itemizedlist mark="bullet" spacing="compact"><listitem><ulink url="http://bit.ly/19eOiDE">View the SPARQL Query Definition via SPARQL Protocol URL</ulink>; </listitem>
<listitem><ulink url="http://bit.ly/18AgJS6">View the SPARQL Query Results via SPARQL Protocol URL</ulink></listitem>
</itemizedlist><bridgehead class="http://www.w3.org/1999/xhtml:h2">Related</bridgehead>
<itemizedlist mark="bullet" spacing="compact"><listitem><ulink url="VirtTipsAndTricksGuide">Virtuoso Tips and Tricks Collection</ulink> </listitem>
<listitem><ulink url="http://docs.openlinksw.com/virtuoso/rdfsparql.html">Virtuoso Documentation</ulink> </listitem>
</itemizedlist></section></docbook>