Name
cx:while — Loop while an expression is true.
Synopsis
A while step is specified by the cx:while
element. It
is a compound step that processes single documents,
applying its subpipeline while the
test
expression is true.
1 |<cx:while
|name? = NCName
|test = xs:string>
|((p:with-input? &
5 |p:output?),
|subpipeline)
|</cx:while>
Description
The result of the cx:while
step is first document for which
the test expression did not have an effective boolean value of true.
The cx:while
has a single anonymous input: its
connection is provided by the
p:with-input
. If no document is explicitly provided,
then the source is read from the default readable
port. It is a
dynamic error (err:XC????
) if the source is not a single
document.
The test
attribute specifies an
XPath expression. The document is provided as the context item. If the
expression is false, the loop is not run (or run again).