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

improve table serialization and display

parent f9b91053
......@@ -575,24 +575,26 @@ return
}
};
declare function local:parse-table($table as element(tei:table)) as element(xhtml:table) {
declare function local:parse-table($table as element(tei:table)) as element(div) {
let $head := $table/tei:head
let $rows := $table/tei:row
let $content := for $row in $rows
let $foot := $table/tei:trailer
return
element div {
attribute class { "table-container" },
element table {
if ( $head ) then element caption { local:magic($head/node()) } else (),
element tbody {
let $rows := $table/tei:row
for $row in $rows
let $cells := $row/tei:cell
return
element tr {
for $cell in $cells return
element td {local:magic($cell/node())}
}
let $foot := $table/tei:trailer
return
element table {
if ($head != "") then element thead {$head} else (),
element tbody {
$content
element td { local:magic($cell/node()) }
}
}
},
if ($foot != "") then element tfoot {$foot} else ()
if ( $foot ) then local:magic($foot/node()) else ()
}
};
\ No newline at end of file
......@@ -82,4 +82,10 @@ button:focus {
.underline {
text-decoration: underline;
}
caption {
caption-side: top;
color: inherit;
padding: 0;
}
\ No newline at end of file
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