Commit c68bf940 authored by sendler's avatar sendler 🐢
Browse files

refactor transformation of tei:persName analogous to other references

parent 9fdf98d4
......@@ -436,27 +436,22 @@ return
</a>
case element ( tei:persName ) return
if (($node/@subtype) = 'persons') then (
<span class="persName">{local:magic($node/node())}</span>,
<a class="persName" href="#" onclick="openPersName('{substring-before(string($node/@ref),' ')}')" textgridURI="{substring-before(string($node/@ref),' ')}">
<i class="fas fa-user"></i>
</a>,
<a class="persName" href="#" onclick="openPersName('{substring-after(string($node/@ref),' ')}')" textgridURI="{substring-after(string($node/@ref),' ')}">
<i class="fas fa-user"></i>
</a>
)
else if (($node/@subtype) = 'family') then (
<a class="persName" href="#" onclick="openPersName('{string($node/@ref)}')" textgridURI="{$node/@ref}">
<span class="persName">{local:magic($node/node())}</span>
<i class="fas fa-users"></i>
</a>
)
else (
<a class="persName" href="#" onclick="openPersName('{string($node/@ref)}')" textgridURI="{$node/@ref}">
<span class="persName">{local:magic($node/node())}</span>
<i class="fas fa-user"></i>
</a>
)
let $refs := tokenize($node/@ref, " ")
return
if ( count($refs) gt 1) then
(<span class="persName">{local:magic($node/node())}</span>,
for $ref in $refs return
<a class="persName" href="#" onclick="openPersName('{$ref}')" textgridURI="{$ref}">
<i class="fas fa-user"></i>
</a>)
else
<a class="persName" href="#" onclick="openPersName('{$refs}')" textgridURI="{$refs}">
<span class="persName">{local:magic($node/node())}</span>
{if ( $node/@subtype = "family" ) then
<i class="fas fa-users"></i>
else
<i class="fas fa-user"></i>}
</a>
case element ( tei:rs ) return
let $refs := tokenize($node/@ref, " ")
......
Supports Markdown
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