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

FUNCTION <function/href.rqg> ( ?uri , ?value ) {
  IF( ISURI(?uri),
    "<a href='{?uri}'>{ IF(BOUND(?value), ?value, ?uri) }</a>",
    IF( ISLITERAL(?uri) , 
      "<span>{?uri}</span>",
      "<span>{?value}</span>"
    )
  )
}  