[fix] replace() -> fn:replace, simplify around #1445

include[@outputformat='print'])
This commit is contained in:
Andy Bunce 2021-12-13 11:30:01 +00:00
parent 7548f1e1c0
commit 4f89dd5fc1

View File

@ -119,7 +119,7 @@ declare %updating function copsrv:upload-zip(
return archive:extract-to($extractTo, $archive, archive:entries($archive)[fn:contains(.,fn:replace($x,'.xml','.docx'))]) return archive:extract-to($extractTo, $archive, archive:entries($archive)[fn:contains(.,fn:replace($x,'.xml','.docx'))])
else else
( (
archive:extract-to($extractTo, $archive, archive:entries($archive)[fn:contains(.,replace($cid, '[^0-9]', ''))]) archive:extract-to($extractTo, $archive, archive:entries($archive)[fn:contains(.,fn:replace($cid, '[^0-9]', ''))])
) )
, ,
let $stepChunk := <step> let $stepChunk := <step>
@ -1437,12 +1437,10 @@ catch * {(: transformation error :)
return return
if($headerXML/*:book/*:include[@outputformat='print']) if($headerXML/*:book/*:include[@outputformat='print'])
then then
let $delete-element := %updating function($headerXML) let $out :=$headerXML transform with {delete node //*:include[@outputformat='print']}
{
delete node $headerXML//*:include[@outputformat='print']
}
return return
file:write(concat($tempFilePath,$cpsrv:bloomsburydbk,$cpsrv:HeaderXml),$headerXML update (updating $delete-element(.) )) file:write(concat($tempFilePath,$cpsrv:bloomsburydbk,$cpsrv:HeaderXml),$out)
else() else()
else() else()
else() else()