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 port | Primary | Sequence | Content types |
|---|---|---|---|
| source | ✔ | ✔ | any |
| Output port | Primary | Sequence | Content types |
|---|---|---|---|
| result | ✔ | application/xml |
| Option name | Type | Default value |
|---|---|---|
| limit | xs:integer | 0 |
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>Description
The p:count step is a
standard XProc 3.0 step.
It is also described on XProcRef.org.