Loading TOC...

sem.prefixes

sem.prefixes(
   $prefixdef as String?,
   [$include-common as Boolean?]
) as Object

Summary

This function returns a set of prefix mappings for use with CURIE processing. Calling this function returns the internal set of default prefixes. The default mappings include prefixes that are widely used and agreed upon, including "cc" (Creative Commons), "dc" (Dublin Core), "dcterms" (Dublin Core Terms), "dbpedia" (dbpedia resources), "dbpedia-owl" (dbpedia ontology), "geonames" (geonames ontology), "foaf" (FOAF), "media" (MediaRSS), "owl" (OWL), " rdf" (RDF), "product" (productV2), "rdfs" (RDF Schema), "skos" (SKOS), "vcard" (VCard vocab), "void" (Vocabulary of Interlinked Datasets), "wikidata" (wikidata entities), "xhtml" (XHTML), and "xs" (XML Schema).

Parameters
$prefixdefA string specifying prefixes in RDFa @prefix format ("prefix: http://base1 prefix2: http://base2").
$include-commonWhether to include the default set of mappings. The default is true.

Example

var sem = require("/MarkLogic/semantics.xqy");

var prefixes = sem.prefixes("ex: http://www.example.com/# \n\
	schema: http://schema.org/"); 
sem.curieExpand("ex:prefLabel", prefixes) 
	
(: returns an IRI :)
=>
    http://example.com/#prefLabel	
    

Comments

    Powered by MarkLogic Server 7.0-4.1 and rundmc | Terms of Use | Privacy Policy