{ declare function local:tocRender($map){ }; } Title { for $map in map:get($toc_map,'toc') return local:tocRender($toc_map) }