Skip to content
This repository has been archived by the owner on Apr 3, 2023. It is now read-only.
Jean-Guilhem Rouel edited this page Feb 24, 2016 · 1 revision

Tasklist specification

The main tasklist file follows a specific XML schema. (TODO: link to the schema).

== Tasklist element == #tasklist `tasklist` is the root element. It can contain one or more [#task] elements.

== Task element == #task The `task` element can contain the following:

 * Exactly one [#conds conds]  element
 * Exactly one [#routine routine] element
 * Zero or one [#parameter parameter] element
 * Exactly one [#output output] element
 * A mandatory unique `id` attribute

== Conds element == #conds The `conds` element is a container of one or more [#cond].

== Cond element == #cond The `cond` element is a condition to respect in order to pass the `if` that uses that `cond`. It contains :

 * A mandatory `id` attribute to reference the condition. This ID will be used in the if tag to reference this condition.
 * An optional `result` attribute which is used to return the opposite of the evaluation of the condition.[[BR]]The two allowed values are :
   * `passed`: if the actual condition succeeded, then this test passed the condition
   * `failed`: if the actual condition succeeded, then this test didn't pass it
 * An optional `observer` attribute is used to know on which observer the condition has to be checked.
 * A `type` attribute specifies which type of condition it has to perform.[[BR]]Currently three types are implemented :
   * `xpath` to check if results from an observer march some xpath
     In this example, cond1 evaluates to `passed` only if the response from obs1 contains a `doctype` element with either "-//W3C//DTD XHTML 1.0 Strict//EN" or "-//W3C//DTD HTML 4.01//EN" in it
   * `mimetype` to check if the submitted document has the right mime-type
     Here, cond2 will succeed only if the submitted document's mime-type is '''not''' "text/html"
   * `parameter` to check the value of a specific parameter
     This condition passes if the parameter "tests" is set to "css-validator"
 * A child tag named `value` is used to write the condition itself (depends on the type).

== Routine element == #routine It contains :

 * a `ref` attribute to use as an ID for the routine.

The `routine` element is a container for the main algorithm of the Task. It allows to write a conditional algorithm for the different checks using exec and if statements.

== Exec element == #exec An `exec` element describes an observer to call.

It can contain:

 * A mandatory `id` attribute containing the id of the tag.
 * A mandatory `value` attribute which is the name of the observer to call
 * A mandatory `type` attribute. The goal of this attribute was to allow to call or another task (to avoid code duplication) rather than an observer. But this doesn't seem so useful in practice so it's likely to be removed in a future version (and is only partially implemented right anyway).[[BR]]The  different explicit values are :
   * `observer`
   * `subtask` (deprecated and may not work)

== If element == #if An `if` element describes an observer to call.

It contains:

 * A mandatory `test` attribute containing the different  conditions to apply. You can put several conditions separated by a coma  ",", which will be interpreted as an "OR".
 * A mandatory `then` tag which will contain the algorithm  to perform (other `if` and `exec`) if the test succeeds.
 * A conditional `else` tag where you'll put the algorithm  to perform if the condition fails.

== Then and else elements == #thenelse Both `then` and `else` elements can contain:

 * One or several `exec` elements
 * One or several `if` elements

Use an extra layer of security with two factor authentication (2FA) when logging into google

Clone this wiki locally