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 portPrimarySequenceContent types
result✔  application/xml 
Option nameTypeDefault valueRequired
pathxs:anyURI ✔ 
detailedxs:booleanfalse() 
exclude-filterxs:string*() 
include-filterxs:string*() 
max-depthxs:string?'1' 
override-content-typesarray(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
CodeDescription
err:XC0012It 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:XC0017It is a dynamic error (err:XC0017) if the absolute path does not identify a directory.
err:XC0090It is a dynamic error (err:XC0090) if an implementation does not support directory listing for a specified scheme.
err:XC0147It is a dynamic error (err:XC0147) if a specified value is not a valid XPath regular expression.
err:XD0064It 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 by p: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 a c: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, or c: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.