PREFIX st:   <http://ns.inria.fr/sparql-template/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX fun: <http://w3id.org/sparql-generate/fn/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX obo: <http://purl.obolibrary.org/obo/>
PREFIX swrl: <http://www.w3.org/2003/11/swrl#>
 
BASE <https://saref.etsi.org/documentation/>
PREFIX iter: <http://w3id.org/sparql-generate/iter/>

TEMPLATE <namespaces.rqg>( ?ontology, ?lang ) { 

before = """\n<div id='namespacedeclarations'>
<h2>{ fun:property(<en.properties>, 'namespaces') }</h2>
<dl>""" ;

  BOX { 
    "\n<dt>{?prefixLabel}:</dt>"
    "\n<dd>{?namespace}</dd>"
  }
; after = """
<dl>
</div>"""

} 
ITERATOR iter:defaultGraphNamespaces() AS ?prefix ?namespace
WHERE {
  BIND( IF( ?prefix != "" , ?prefix , "<em>{fun:property(<en.properties>, 'namespace')}</em>" ) AS ?prefixLabel )
}



