Set Standard Prefix Names for common vocabularies

In order to set standard prefix names for common vocabularies on dumps to either .n3 or .ttl, you should use the xml_set_ns_decl Virtuoso function.

The initial list of namespace declarations can be found by executing from iSQL or Conductor UI:



  1. Load the ontology, for ex.:

    SQL> DB.DBA.RDF_LOAD_RDFXML (http_get(''), '', ''); Done. -- 109 msec.

  2. Check total triples retrieved:

    SQL>SPARQL SELECT COUNT(*) from <> WHERE {?s ?p ?o}; callret-0 INTEGER _______________________________________________________________________________ 495 1 Rows. -- 16 msec.

  3. Register the XML NS prefix:

    SQL>DB.DBA.XML_SET_NS_DECL ('txn', '', 2); Done. -- 0 msec.

  4. Use the prefix, for ex. executing:

    SQL>SPARQL SELECT COUNT(*) WHERE { ?s ?p txn:SpeciesConcept }; callret-0 INTEGER _______________________________________________________________________________ 25 1 Rows. -- 0 msec.