ndw / xmlcalabash1

XML Calabash, an XProc processor
http://xmlcalabash.com/
108 stars 41 forks source link

pxf:delete fails for non-existant directories even with fail-on-error #309

Closed FigmentEngine closed 4 years ago

FigmentEngine commented 4 years ago

When run with a directory that does not exist, this fails. I am guessing that "fail-on-error" only handles failure to delete folder, not that folder does not exist.

command $ java -Xmx4096M -classpath ../saxon/saxon9ee.jar:./xmlcalabash-1.2.1-99.jar com.xmlcalabash.drivers.Main --saxon-configuration ../saxon/sax.conf ../../content/shells/process/build.xpl root=/mnt/w/volatile/hydrogen

result ERROR: err:XC0012:XC0012 ERROR: It is a dynamic error if the contents of the directory path are not available to the step due to access restrictions in the environment in which the pipeline is run.

source: `<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:pxf="http://exproc.org/proposed/steps/file" version="3.0">

<p:import href="http://xmlcalabash.com/extension/steps/library-1.0.xpl"/>

<p:option name="path" />

<pxf:delete>
    <p:with-option name="href" select="$path" />
    <p:with-option name="recursive" select="true()" />
    <p:with-option name="fail-on-error" select="false()" />
</pxf:delete>

</p:declare-step>`