Answer XML Grammar

Following is described the global structure of the XML stream used as input in PUT .../parameters requests. This XML stream contains the actual answers to pass to contexts or prompts, and the query of a list of values for the parameters that remain to be answered.
<parameters>
    <parameter>
        <id>An identifier</id>
        <answer type="Text|Numeric|Date|DateTime constrained="true|false">
            <info>
                [LOV_Query|LOV]
            </info>
            Values
        </answer>
    </parameter>
    ...
</parameters>
Remember The <info> element is not mandatory in the XML inputs, except in the case of cascading parameters and hierarchical parameters.

LOV_Query defines the query used to retrieve a list of values for unanswered parameters. The query can specify how values will be returned, and/or refreshed if the list of values allows it. It is made of the following elements:

<lov hierarchical="true|false" partial="true|false" refreshable="true|false" searchable="true|false"> 
    <query intervalId="true|false" intervalSize="Integer" refresh="true|false"> 
        <sort="Ascending|Descending|None"/>
        <search>A search pattern</search>
        <path>  
            <value id="String" type="String|Date|Numeric">A value</value>
            ... 
        </path>
    </query> 
</lov>

The following table describes the <query> attributes:

Attribute Description
intervalId Specifies which interval should be returned. Optional. An error is returned if this index is out of range (depending of values count).
intervalSize Specifies the number of values in the interval to return. Optional.
refresh Specifies whether the list of values is refreshed. Optional. An error is returned if the list of values does not allow refreshing.

The following <query> children describe the query:

Child Element Description
<sort> Specifies whether the list of values must be returned sorted. Optional.
<search> Optional. Defines a search pattern in the list of values as a string. The following wildcard characters may be used in the pattern string: ? for zero or one character, and * for zero or n characters. For example, M?Gregor yields to the value McGregor, and M*Gregor to the values McGregor and MacGregor.
<path> Optional. In the case of a hierarchical parameter, it specifies the intermediate answer value. It also specifies the node for which the list of values is requested. This path is expressed as a sequence of <value> elements. Each value defines a value for a node.

See <path> parameter example in Example - Responding to a Hierarchical Parameter and Example - Refreshing a Document with a Hierarchical Parameter.

The following table describes the <value> attributes:

Attribute Description
id Mandatory if the value contains an answer to a context or if the prompt is index-aware. It defines the context identifier or the value index.
type The value type. Default is string.

LOV defines the possible values of the list of values. It is not mandatory in the XML input. See its description in Lists of Values.

Values defines the actual values that answer to the parameter. It is not mandatory in the XML input.

<values>
    <value path="[[0|1|2,\ second_level_value],[0|1|2,\ third_level_value],[...]]"
        id="String">A value</value>
    ...
</values>

The following table describes the <value> attributes:

Attribute Description
id Mandatory if the value contains an answer to a context or if the prompt is index-aware. It defines the context identifier or the value index.
path Optional. In the case of hierarchical parameters, specifies the values and types of the hierarchy, starting with the second level. This attribute is only needed in the value element of the XML input of the PUT .../parameters call.

The syntax [0|1|2,\ value] describes the data type and the data value of a level.

  • 0 represents a string
  • 1 represents a date
  • 2 represents a number

See path attribute example in Example - Responding to a Hierarchical Parameter and Example - Refreshing a Document with a Hierarchical Parameter.

The request body for a non-hierarchical parameter in the JSON format will have the following syntax:

{"parameters":{"parameter":{"id":0,"answer":{"values":{"value":{"@id":"2"}}}}}}