From: Joe W. <jo...@gm...> - 2013-08-29 14:19:46
|
Hi all, I have been using the xslfo module (configured to use Apache FOP) to create PDFs from TEI, and I have one TEI file that, for some reason, causes the xslfo:render() step to run indefinitely. The only way I have been able to stop the process is by shutting down eXist-db. I'd like to use system:kill-running-query(), but it isn't killing the query. Does anyone know why this wouldn't work? Here's the result of system:get-running-queries() - via eXide logged in as admin: <system:xqueries xmlns:system="http://exist-db.org/xquery/system"> <system:xquery id="1822313771" sourceType="Database" started= "2013-08-29T09:03:30.589-04:00" terminating="true"> <system:sourceKey>/db/apps/xslfo/stream-tei-to-pdf.xq </system:sourceKey> <system:xqueryExpression>let $vol-id := request:get-parameter(dynamic-cardinality-check("exactly one", "vol-id"), dynamic-cardinality-check("zero or more", ())) return if ( empty(dynamic-cardinality-check("zero or more", $vol-id)) ) then element {"error"} {text {A 'vol-id' parameter is required. 'div-id' is optional. use 'dump=true' to see fo output.}} else let $div-id := request:get-parameter(dynamic-cardinality-check("exactly one", "div-id"), dynamic-cardinality-check("zero or more", ())) , let $dump := request:get-parameter(dynamic-cardinality-check("exactly one", "dump"), dynamic-cardinality-check("zero or more", false())) cast as xs:boolean , let $pdf := t2f:generate-pdf(dynamic-type-check[xs:string, untyped-value-check[xs:string, dynamic-cardinality-check("exactly one", $vol-id)]], dynamic-type-check[xs:string, untyped-value-check[xs:string, dynamic-cardinality-check("zero or one", $div-id)]], dynamic-type-check[xs:boolean, untyped-value-check[xs:boolean, dynamic-cardinality-check("zero or one", $dump)]]) , let $pdffilename := concat(atomize[dynamic-cardinality-check("zero or one", $vol-id)], atomize[dynamic-cardinality-check("zero or one", if ( $div-id ) then concat(dynamic-cardinality-check("zero or one", "_"), atomize[dynamic-cardinality-check("zero or one", $div-id)]) else ())], dynamic-cardinality-check("zero or one", ".pdf")) return if ( $dump ) then $pdf else response:stream-binary(dynamic-type-check[xs:base64Binary, untyped-value-check[xs:base64Binary, dynamic-cardinality-check("exactly one", $pdf)]], dynamic-cardinality-check("exactly one", "application/pdf"), dynamic-type-check[xs:string, untyped-value-check[xs:string, dynamic-cardinality-check("zero or one", $pdffilename)]]) </system:xqueryExpression> </system:xquery> </system:xqueries> Using the id here, I try to kill the query - again, via eXide: let $xquery-id := 1822313771 return system:kill-running-xquery($xquery-id) The query returns 0 items in ~.003s. The function docs say system:kill-running-xquery() should return item() but I don't know what to expect. http://exist-db.org/exist/apps/fundocs/view.html?uri=http://exist-db.org/xquery/system#kill-running-xquery.1 Running eXist 2.1. Thanks in advance for any tips. Joe |