PREFIX st:   <http://ns.inria.fr/sparql-template/>
PREFIX fun: <http://w3id.org/sparql-generate/fn/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX dcterms: <http://purl.org/dc/terms/>

BASE <https://saref.etsi.org/documentation/>

TEMPLATE <ontology/contributors.rqg>( ?onto ) {
  IF(?contributors != "" , "<dt>{fun:property(<en.properties>, 'contributors')}</dt><dd>\n{ ?contributors } </dd>", "" )
}
SOURCE <contributors.html> AS ?html
SOURCE <contributors.md> AS ?md
WHERE {
  OPTIONAL { ?onto dcterms:contributor ?contributor . }
  BIND( COALESCE( str( ?html ) , fun:markdownToHTML(?md), st:call-template( <ontology/contributors_schema.rqg>, ?onto ) ) AS ?contributors )
}
LIMIT 1 

