From ff8aa6570cb481d5d56bf19f2fba6e54070f0848 Mon Sep 17 00:00:00 2001 From: IS4 Date: Thu, 6 May 2021 12:25:19 +0200 Subject: [PATCH] Display datatype links like other links Datatype links are the only links that are not displayed with a label taken from the database, and not linking to a `/describe` page first. This changes that so that datatype links (custom datatypes in particular) are processed akin to normal property links. --- binsrc/fct/rdfdesc/description.sql | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/binsrc/fct/rdfdesc/description.sql b/binsrc/fct/rdfdesc/description.sql index 2213c9b6ef..7d6d545988 100644 --- a/binsrc/fct/rdfdesc/description.sql +++ b/binsrc/fct/rdfdesc/description.sql @@ -854,7 +854,12 @@ create procedure b3s_label (in _S any, in langs any, in lbl_order_pref_id int := create procedure b3s_xsd_link (in dt varchar) { - return sprintf ('%s', dt, b3s_uri_curie(dt)); + declare p_prefix, url any; + p_prefix := b3s_label (dt, null); + if (not length (p_prefix)) + p_prefix := b3s_uri_curie (dt); + url := b3s_http_url (dt, null, null, 0); + return sprintf ('%s', url, p_prefix); } ;