declare function f-ueberblickskommentar:format($tei as element(tei:teiHeader)){
<ul>{
for $item in $tei/fileDesc/sourceDesc/msDesc/physDesc/objectDesc/supportDesc/extent/dimensions
return
<li>{
switch(string($item/@type)) case 'leaf' return 'Blatt' case 'binding' return 'Einband' default return 'TODO: @type übersetzen!!!',
<ul>{
for $i in $item/*
return
<li>{
switch($i/local-name()) case 'width' return 'Breite' case 'height' return 'Höhe' case 'depth' return 'Tiefe' default return 'TODO: ' || $i/local-name() || ' übersetzen!!!'}
 
{string($i/@quantity)}
{string($i/@unit)
}</li>
}</ul>
}</li>
}</ul>
case 12 return <ul>{for $item in $tei//sourceDesc/msDesc/physDesc/typeDesc/ab return <li>{local:textref($item//text()[not(parent::tei:hi)])}</li>}</ul>
case 13 return $tei/fileDesc/sourceDesc/msDesc/physDesc/objectDesc/layoutDesc/layout/text()
case 14 return $tei/fileDesc/sourceDesc/msDesc/physDesc/objectDesc/supportDesc/extent/measure/@quantity || ' ' || (switch(string($tei/fileDesc/sourceDesc/msDesc/physDesc/objectDesc/supportDesc/extent/measure/@unit)) case 'leaf' return 'Blatt' default return 'TODO: Einheit übersetzen!!!')
case 15 return <ul>{for $item in $tei/fileDesc/sourceDesc/msDesc/physDesc/objectDesc/supportDesc/extent/dimensions return <li>{switch(string($item/@type)) case 'leaf' return 'Blatt' case 'binding' return 'Einband' default return 'TODO: @type übersetzen!!!'} <ul>{for $i in $item/* return <li>{switch($i/local-name()) case 'width' return 'Breite' case 'height' return 'Höhe' case 'depth' return 'Tiefe' default return 'TODO: local-name() übersetzen!!!'} {string($i/@quantity)} {string($i/@unit)}</li>}</ul></li>}</ul>
case 16 return <p>{$tei/fileDesc/sourceDesc/msDesc/physDesc/bindingDesc//text()}</p>
(: case 17 return (if($tei/fileDesc/sourceDesc/msDesc/physDesc/accMat/text()) then $tei/fileDesc/sourceDesc/msDesc/physDesc/accMat/text() else 'Keine'):)
case 17 return let $types := distinct-values( $tei/fileDesc/sourceDesc/msDesc/physDesc/objectDesc/supportDesc/support/ab/hi/string(.) )
};
declare function f-ueberblickskommentar:einband($tei as element(tei:teiHeader)){