All flow-functions produce a result. The output element informs the flow-function as to which spaces the result should be placed. A flow-function may have multiple output declarations, and each one will receive it's own copy of the flow-function result.
It is important to remember that the default output (ie, if no output is declared) is space="immediate", which passes the result to the parent (or to stdout when the flow-function is the root element). Therefore, when results are to be discarded, an output of space="none" must be declared.
The following example shows an example of placing a result into a store. This store is then tested against the same data, and where you can see that it exists and is the same as the store.
<instruction>
<output space="store" value="number" />
<input value="1234321" />
</instruction>
<comparison operation="equal">
<comparate space="store" value="number" />
<comparate value="1234321" />
<ontrue value="This number exists" />
<onfalse value="This number doesn't exist" />
</comparison>This number exists
This is only used when the space attribute is a cookie. There are four values: ('value', 'expires', 'domain', 'path') which refer to the different parts of a response cookie. By default it is the value of the cookie which is set. As well as the standard date format, the expires value recognises two helper settings: "persist" and "discard". Persist will set expiry one year hence, and discard will set expiry into the past, effectively asking the user-agent to delete the cookie.
<instruction>
<output space="cookie" part="value" value="foo" />
<input value="hello" />
</instruction>
Set-Cookie:foo=hello; path=/