<docbook><section><title>VirtSetPrefixNames</title><title>Set Standard Prefix Names for common vocabularies</title>Set Standard Prefix Names for common vocabularies
<para>In order to set  standard prefix names for common vocabularies on dumps to either .n3 or .ttl, you should use the <ulink url="http://docs.openlinksw.com/virtuoso/fn_xml_set_ns_decl.html">xml_set_ns_decl</ulink> Virtuoso function.</para>
<para>The initial list of namespace declarations can be found by executing from iSQL or Conductor UI: </para>
<programlisting>SQL&gt; SELECT * FROM DB.DBA.SYS_XML_PERSISTENT_NS_DECL;
</programlisting><bridgehead class="http://www.w3.org/1999/xhtml:h2">Example</bridgehead>
<orderedlist spacing="compact"><listitem>Load the ontology, for ex.: <programlisting>SQL&gt; DB.DBA.RDF_LOAD_RDFXML (http_get(&#39;http://lod.taxonconcept.org/ontology/txn.owl&#39;), &#39;&#39;, &#39;http://lod.taxonconcept.org/ontology/txn.owl#&#39;);

Done. -- 109 msec.
</programlisting></listitem>
<listitem>Check total triples retrieved: <programlisting>SQL&gt;SPARQL 
SELECT COUNT(*)  
from &lt;http://lod.taxonconcept.org/ontology/txn.owl#&gt;
WHERE {?s ?p ?o};
callret-0
INTEGER
_______________________________________________________________________________

495

1 Rows. -- 16 msec.
</programlisting></listitem>
<listitem>Register the XML NS prefix: <programlisting>SQL&gt;DB.DBA.XML_SET_NS_DECL (&#39;txn&#39;, &#39;http://lod.taxonconcept.org/ontology/txn.owl#&#39;, 2);
Done. -- 0 msec.
</programlisting></listitem>
<listitem>Use the prefix, for ex.
 executing: <programlisting>SQL&gt;SPARQL 
SELECT COUNT(*) 
WHERE
   {
     ?s ?p txn:SpeciesConcept
    };

callret-0
INTEGER
_______________________________________________________________________________

25

1 Rows. -- 0 msec.
</programlisting></listitem>
</orderedlist></section></docbook>