PREFIX dc:   <http://purl.org/dc/terms/>
PREFIX st: <http://ns.inria.fr/sparql-template/>
PREFIX doc: <https://w3id.org/seas/documentation/html/loweringRule#>
TEMPLATE doc:object-of (?ns, ?o, ?predicate, ?label){ 

    "- **" str(?label) "** " str(?slink) st:call-template(doc:object-of-more, ?ns, ?o, ?predicate, ?label) " \n"  # first time

    ", " str(?slink) # rest

} WHERE { 
    ?s ?predicate ?o .
    BIND( IF( STRSTARTS( str(?s), str(?ns) ) , CONCAT( "[", STRAFTER(str(?s), str(?ns)), "](", str(?s), ")") , CONCAT( "[", str(IRI(?s)), "](", str(?s), ")") ) AS ?slink )
    FILTER( isIRI(?s) )
}