Name
p:file-copy — The standard p:file-copy step.
Synopsis
The p:file-copy
step copies a file or a directory to a given target.
Output port | Primary | Sequence | Content types |
---|---|---|---|
result | ✔ | application/xml |
Option name | Type | Default value | Required |
---|---|---|---|
href | xs:anyURI | ✔ | |
target | xs:anyURI | ✔ | |
fail-on-error | xs:boolean | true() | |
overwrite | xs:boolean | true() |
Declaration
1 |<p:declare-step xmlns:p="http://www.w3.org/ns/xproc">
| <p:output port="result" primary="true" content-types="application/xml"/>
| <p:option name="href" required="true" as="xs:anyURI"/>
| <p:option name="target" required="true" as="xs:anyURI"/>
5 | <p:option name="fail-on-error" as="xs:boolean" select="true()"/>
| <p:option name="overwrite" as="xs:boolean" select="true()"/>
|</p:declare-step>
Errors
Code | Description |
---|---|
err:XC0050 | It is a dynamic error (err:XC0050 ) the file or directory cannot be copied
to the specified location. |
err:XC0144 | It is a dynamic error (err:XC0144 ) if an
implementation does not support p:file-copy for a specified scheme. |
err:XC0145 | It is a
dynamic error (err:XC0145 ) if p:file-copy is not available to the step due to access restrictions
in the environment in which the pipeline is run. |
err:XC0157 | It is a dynamic error (err:XC0157 ) if the href
option names a directory, but the target option names a file. |
err:XD0011 | It is a dynamic error (err:XD0011 ) if the resource referenced by the
href option does not exist, cannot be accessed or is not a file or directory. |
err:XD0064 | It is a dynamic
error (err:XD0064 ) if the base URI is not both absolute and valid according to RFC 3986. |
Implementation defined features
- Conformant processors must support URIs whose
scheme is
file
for thehref
andtarget
options ofp:file-copy
. It is implementation-defined what other schemes are supported byp:file-copy
, and what the interpretation of ‘directory’, ‘file’ and ‘contents’ is for those schemes.
Description
The p:file-copy
step is defined in the
XProc 3.1:
Standard Step Library. It is also described on
XProcRef.org.