PREFIX st:   <http://ns.inria.fr/sparql-template/>
PREFIX fun: <http://w3id.org/sparql-generate/fn/>
PREFIX dcterms: <http://purl.org/dc/terms/>

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

TEMPLATE <ontology/examples.rqg>( ) {
  IF( ?examples != "" , "<h2 id=\"examples\">{ fun:property(<en.properties>, 'examples') }</h2>\n{ ?examples }" , "" )
}
SOURCE <examples.html> AS ?html
SOURCE <examples.md> AS ?md
WHERE {
  BIND( COALESCE( str( ?html ) , fun:markdownToHTML(?md) , "" ) AS ?examples )
}

