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/creators.rqg>( ?onto ) {

  IF(?creators != "" , "<dt>{fun:property(<en.properties>, 'creators')}</dt><dd>\n{ ?creators } </dd>", "<dt>{fun:property(<en.properties>, 'creators')}</dt><dd>\nViolation of ETSI TS 103 673 Clause 9.4.3.3</dd>" )
}
SOURCE <creators.html> AS ?html
SOURCE <creators.md> AS ?md
WHERE { 
  OPTIONAL { ?onto dcterms:creator ?creator . }
  BIND( COALESCE( str( ?html ) , fun:markdownToHTML(?md), st:call-template( <ontology/creators_schema.rqg>, ?onto ) ) AS ?creators )
} LIMIT 1

