blob: 775e4c760a846860cb12290af53e8ca958cee80f [file] [log] [blame]
(: insert-start :)
declare variable $input-context external;
(: insert-end :)
declare function local:section-summary($book-or-section as element()*)
as element()*
{
for $section in $book-or-section
return
<section>
{ $section/@* }
{ $section/title }
<figcount>
{ count($section/figure) }
</figcount>
{ local:section-summary($section/section) }
</section>
};
<toc>
{
for $s in $input-context/book/section
return local:section-summary($s)
}
</toc>