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:
SQL> SELECT * FROM DB.DBA.SYS_XML_PERSISTENT_NS_DECL;
Example
- Load the ontology, for ex.:
SQL> DB.DBA.RDF_LOAD_RDFXML (http_get('http://lod.taxonconcept.org/ontology/txn.owl'), '', 'http://lod.taxonconcept.org/ontology/txn.owl#'); Done. -- 109 msec.
- Check total triples retrieved:
SQL>SPARQL SELECT COUNT(*) from <http://lod.taxonconcept.org/ontology/txn.owl#> WHERE {?s ?p ?o}; callret-0 INTEGER _______________________________________________________________________________ 495 1 Rows. -- 16 msec.
- Register the XML NS prefix:
SQL>DB.DBA.XML_SET_NS_DECL ('txn', 'http://lod.taxonconcept.org/ontology/txn.owl#', 2); Done. -- 0 msec.
- Use the prefix, for ex.
executing:
SQL>SPARQL SELECT COUNT(*) WHERE { ?s ?p txn:SpeciesConcept }; callret-0 INTEGER _______________________________________________________________________________ 25 1 Rows. -- 0 msec.