Commit 50241a1b authored by Mathias Goebel's avatar Mathias Goebel 🎠
Browse files

Merge branch 'feature/error-message-for-idno' into 'develop'

more custom errors

See merge request !68
parents 95925e70 c5dfdb6f
...@@ -5,7 +5,7 @@ xquery version "3.1"; ...@@ -5,7 +5,7 @@ xquery version "3.1";
: the index for a single notebook. : the index for a single notebook.
: The corresponding viewer module is `index-viewer.xqm`. : The corresponding viewer module is `index-viewer.xqm`.
: @author Mathias Göbel : @author Mathias Göbel
: @version 1.1.2 : @version 1.1.3
: @see https://fontane-nb.dariah.eu/register.html : @see https://fontane-nb.dariah.eu/register.html
:) :)
module namespace ixp="http://fontane-nb.dariah.eu/index-processor"; module namespace ixp="http://fontane-nb.dariah.eu/index-processor";
...@@ -255,6 +255,10 @@ if(not(exists($variant))) then () else ...@@ -255,6 +255,10 @@ if(not(exists($variant))) then () else
declare function ixp:idno($idnos as element()*) declare function ixp:idno($idnos as element()*)
as element(xhtml:li)* { as element(xhtml:li)* {
for $idno in $idnos 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 $str := string($idno)
let $wikipedia := let $wikipedia :=
if($idno/@type = "GND") then ixp:gnd-wikipedia($str) else 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