Name

cx:until — Loop until an expression is true.

Synopsis

An until step is specified by the cx:until element. It is a compound step that processes single documents, applying its subpipeline until the test expression is true.

1 |<cx:until
  |  name? = NCName
  |  test = xs:string>
  |    ((p:with-input? & 
5 |      p:output?),
  |     subpipeline)
  |</cx:until>

Description

The result of the cx:until step is first document for which the test expression is true.

The cx:until 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 subpipeline is always run at least once.

The test attribute specifies an XPath expression. The result of the subpipeline is provided as the context item. The previous result is provided in the variable cx:previous.