Commit c5dfdb6f authored by Mathias Goebel's avatar Mathias Goebel 🎠
Browse files

set custom error code when idno has no content.

parent 95925e70
......@@ -5,7 +5,7 @@ xquery version "3.1";
: the index for a single notebook.
: The corresponding viewer module is `index-viewer.xqm`.
: @author Mathias Göbel
: @version 1.1.2
: @version 1.1.3
: @see https://fontane-nb.dariah.eu/register.html
:)
module namespace ixp="http://fontane-nb.dariah.eu/index-processor";
......@@ -255,6 +255,10 @@ if(not(exists($variant))) then () else
declare function ixp:idno($idnos as element()*)
as element(xhtml:li)* {
for $idno in $idnos
where string-length($idno) lt 1
return
error(QName("FONTANE", "INDEX3"), "got empty ID in element: " || serialize($idno/parent::tei:* ) ),
for $idno in $idnos
let $str := string($idno)
let $wikipedia :=
if($idno/@type = "GND") then ixp:gnd-wikipedia($str) else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment