pdf:insert-toc-headers( $doc as node()?, $toc as element()? ) as node()?
Locate TOC anchors and make them properly refer to headers at the appropriate level. Returned the transformed document.
Parameters | |
---|---|
doc | The cleaned XHTML produced by PDF conversion. |
toc | The normalized TOC. |
xquery version "1.0-ml"; import module namespace pdf = "http://marklogic.com/cpf/pdf" at "/MarkLogic/conversion/pdf.xqy"; xdmp:document-insert( "myfile.xhtml", pdf:insert-toc-headers( doc("myfile.xhtml"), pdf:get-toc("myfile.xhtml") ) )