message element is the root element.
message element has 3 attributes: messageid (required), timestamp and sender. messageid is a unique identifier that is used to track messages (eventually this will be a uuid). timestamp is a time and date using the dateTime XML Schema data dype. sender is a reference to the id of the agent that send the message (eventually this will be a uuid). sender will be used by control agents.
A message element can contain either a request or response element.
a request element has a single attribute, responseRequired (required) that is either of value Yes or No.
a request element can contain 3 types of element: action, pattern and criteria. There must be 1 and only 1 action element. There can be 0 or more pattern elements and there can be 0 or more criteria elements.
a response element has 2 attributes: status (not required) and messageid (required). status is a string reporting on the response to the request e.g. failed, successful. Eventually we will probably define a taxonomy of status terms - for now any string text is OK. messageid is a reference to the id of the message that contained the request message that this is the response to.
a response element can contain either text or other elements. We've left the contents open at the point, although we may eventually want to further define the allowed content.
a number element is a type of request criteria and is designed for specifying the number of matches -- minimum, maximum, first 20 etc.
timeLimit element is a type of request criteria and is designed for specifying a timeLimit (e.g. 20 seconds) to respond to the request.
format element is a type of request criteria and is designed for specifying the format you want the response information in.
an inputdata element is a type of request criteria and is designed for specifying the data that is to be used for the matching.
a criteria element can contain up to 5 types of element: number, timeLimit, belief, format, inputdata. The criteria element is designed to specify control criteria to be used by a controller to describe how to deal with the message. Hence number element can be used to specify how much you want returned, timeLimit used to specify how quickly you want stuff returned, format to specify the format you want things returned in. Belief is designed to be used as a threshold controller, so that a measure/value pair of beleif can be specified e.g. to state a minimum belief threshold of information that you want returned. All these content elements are optional, with a maximum of 1 of each. The 5th possible element type is inputdata. Again this is optional and there can be 0 or more of these. Inputdata is designed to specify what data is to be used for the matching.
action element can be thought of the verb of the message -- telling a controller what to do, e.g. MATCH a pattern; DISPLAY a graph. A message must contain 1 and only 1 action element. We've left the content model as Mixed so that it can contain string text for now, or other (to be defined) elements in the future. We anticpate an ontology of tool capabilities will be defined and we'll be able to leverage this for the content model of this element.