Commit 9fdf98d4 authored by sendler's avatar sendler 🐢
Browse files

refactor transformation of tei:placeName analogous to other references

parent f1c03053
......@@ -407,32 +407,29 @@ return
<span class="tei-add"><span class="tei-add-bracket">⟨</span>{string($node)}<span class="tei-add-bracket">⟩</span></span>
case element ( tei:placeName ) return
if (($node/@subtype) = 'rooms') then (
<span class="placeName">{local:magic($node/node())}</span>,
<a class="placeName" href="#" onclick="openPlaceName('{substring-before(string($node/@ref),' ')}')" textgridURI="{substring-before(string($node/@ref),' ')}">
<i class="fas fa-map-marker-alt"></i>
</a>,
<a class="placeName" href="#" onclick="openPlaceName('{substring-after(string($node/@ref),' ')}')" textgridURI="{substring-after(string($node/@ref),' ')}">
<i class="fas fa-map-marker-alt"></i>
</a>
)
else (
<a class="placeName" href="#" onclick="openPlaceName('{string($node/@ref)}')" textgridURI="{$node/@ref}">
<span class="placeName">{local:magic($node/node())}</span>
<i class="fas fa-map-marker-alt"></i>
</a>
)
let $refs := tokenize($node/@ref, " ")
return
if ( count($refs) gt 1) then
(<span class="placeName">{local:magic($node/node())}</span>,
<a class="placeName" href="#" onclick="openPlaceName('{$ref}')" textgridURI="{$ref}">
<i class="fas fa-map-marker-alt"></i>
</a>)
else
<a class="placeName" href="#" onclick="openPlaceName('{$refs}')" textgridURI="{$refs}">
<span class="placeName">{local:magic($node/node())}</span>
<i class="fas fa-map-marker-alt"></i>
</a>
case element ( tei:geogName ) return
let $refs := tokenize($node/@ref, " ")
return
if ( count($refs) gt 1 ) then (
<span class="placeName">{local:magic($node/node())}</span>,
if ( count($refs) gt 1 ) then
(<span class="placeName">{local:magic($node/node())}</span>,
for $ref in $refs return
<a class="placeName" href="#" onclick="openPlaceName('{$ref}')" textgridURI="{$ref}">
<i class="fas fa-map-marker-alt"></i>
</a>
) else
</a>)
else
<a class="placeName" href="#" onclick="openPlaceName('{string($node/@ref)}')" textgridURI="{$node/@ref}">
<span class="placeName">{local:magic($node/node())}</span>
<i class="fas fa-map-marker-alt"></i>
......
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