Name
p:directory-list — The standard p:directory-list step.
Synopsis
The p:directory-list
step produces a list of the contents
of a specified directory.
Output port | Primary | Sequence | Content types |
---|---|---|---|
result | ✔ | application/xml |
Option name | Type | Default value | Required |
---|---|---|---|
path | xs:anyURI | ✔ | |
detailed | xs:boolean | false() | |
exclude-filter | xs:string* | () | |
include-filter | xs:string* | () | |
max-depth | xs:string? | '1' | |
override-content-types | array(array(xs:string))? | () |
Declaration
1 |<p:declare-step xmlns:p="http://www.w3.org/ns/xproc">
| <p:output port="result" content-types="application/xml"/>
| <p:option name="path" required="true" as="xs:anyURI"/>
| <p:option name="detailed" as="xs:boolean" select="false()"/>
5 | <p:option name="max-depth" as="xs:string?" select="'1'"/>
| <p:option name="include-filter" as="xs:string*"/>
| <p:option name="exclude-filter" as="xs:string*"/>
| <p:option name="override-content-types" as="array(array(xs:string))?"/>
|</p:declare-step>
Errors
Code | Description |
---|---|
err:XC0012 | It is a
dynamic error (err:XC0012 ) 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. |
err:XC0017 | It is a
dynamic error (err:XC0017 ) if the absolute path does not
identify a directory. |
err:XC0090 | It is a dynamic error (err:XC0090 ) if an
implementation does not support directory listing for a specified scheme. |
err:XC0147 | It is a dynamic
error (err:XC0147 ) if a specified value is not a valid XPath regular
expression. |
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 directory paths whose
scheme is
file
. It is implementation-defined what other schemes are supported byp:directory-list
, and what the interpretation of ‘directory’, ‘file’ and ‘contents’ is for those schemes. - Any file or directory determined to be
special by the
p:directory-list
step may be output using ac:other
element but the criteria for marking a file as special are implementation-defined. - The precise meaning of the detailed properties are
implementation-defined and may vary according
to the URI scheme of the
path
. - Any other attributes on
c:file
,c:directory
, orc:other
are implementation-defined
Description
The p:directory-list
step is defined in the
XProc 3.1:
Standard Step Library. It is also described on
XProcRef.org.