Name

p:count — The standard p:count step.

Synopsis

The p:count step counts the number of documents in the source input sequence and returns a single document on result containing that number. The generated document contains a single c:result element whose contents is the string representation of the number of documents in the sequence.

Input portPrimarySequenceContent types
source✔ ✔ any 
Output portPrimarySequenceContent types
result✔  application/xml 
Option nameTypeDefault value
limitxs:integer0
Declaration
1 |<p:declare-step xmlns:p="http://www.w3.org/ns/xproc">
  |   <p:input port="source" content-types="any" sequence="true"/>
  |   <p:output port="result" content-types="application/xml"/>
  |   <p:option name="limit" as="xs:integer" select="0"/>
5 |</p:declare-step>
Errors
CodeDescription

Description

The p:count step is defined in the XProc 3.0: Standard Step Library. It is also described on XProcRef.org.