with

Function (or source) argument initial value

Usage

Can be stored and retrieved (using the element's name and its name attribute) in the repository

Description

Sets the initial value of a function argument (i.e., a variable declared in the function prototype).

Attributes

  • read-only (May only be: true)
  • name (NMToken) - The name of the argument.
  • value (Text) - The value it will be initialized to.
  • copy-of (NMToken) - Sets the value of an argument to the value of a variable defined in the current state.
  • in-source (NMToken) - This allows to set a variable in a specific source from outside the source (convenient for creating source specific variables like username and password which will be specified by the user). Note that these variables need to be declared in the prototype of the source.

Examples

Input Example:

<function name="f">
<prototype>
<declare name="v" type="string"/>
</prototype>
<_xml_/>
<value-of-var name="v"/>
</function>
<call-function name="f">
<with name="v" value="ok"/>
</call-function>

Output Example:

<function name="f">
<prototype>
<declare name="v" type="string"/>
</prototype>
<_xml_/>
<value-of-var name="v"/>
</function>
<_xml_/>ok