Instance Record Forms Format

Introduction
The Instance Record Forms Format (IRFF) is used to describe forms describing different characteristics of instance records to be generated and added to web pages. The IRFF forms are generally used to describe (add/update/delete) information about instance records. These forms are currently used by OSF-Drupal modules such as structCreate, structUpdate and structScones.

These forms are written by the system administrators and are specially tailored for the needs of a particular OSF-Drupal node.

The general workflow utilizing IRFF is:

Ontologies act to generate a forms file --> Forms file enables admins to edit forms for different purposes --> Final forms

Then:

Final forms --> Create/Update page --> Updated record in structWSF

Using IRFF makes it easier to develop and maintain domain nodes.

Overview
A forms XML file describes a set of forms that can be used by an application to describe an instance record. Each form of that set outlines a list of fields that belonsg to the form.

Each form has a type. The type of a form is used by a system to determine what form should be selected for a given type of instance record.

Each field is related to an HTML input control. Each field is also related to an attribute that is used to describe an instance record of the type of the form.

A (form->type)->(field->rel) will result in a (instance record)--attribute-->(value) triple.

Format
This IRFF is serialized in XML. This section explains all the XML elements and attributes that compose the format.

The element includes all the forms and prefixes. This is the root element of the XML document.

The element includes all the prefixes binding elements.

A element bind a prefix "foo:" to the base URI it should be extended to, by any system that uses the IRFF.

In IRFF, form type and field rel can be shortened by using prefixes. A prefix is the short-hand version of a URI. The prefixes are at the beginning of an URI identifier, and are seperated by a column ":".

Lets take a look at this example. Lets say that we have these prefixes defined for our example:

Now, let say that we have this field defined in our IRFF file:

In this case, the element's real URI reference is no "geonames:name" but " http://www.geonames.org/ontology#name ". Any system that uses a IRFF file has to extend these references to their full URI.

prefix
The prefix attribute of the element is used to define the prefix used within the same IRFF file.

uri
The uri attribute of the element is used to base URI to use to replace the prefix when the form get processed by any syste.

The element describe the form to use to describe an instance record of a certain type. This form as a  and a. It also includes a series of.

Note: the order of the fields in a form is kept once the form get rendered to the user.

type
The type attribute is used to bind the form to a given instance record type. This type refers to the kind of instance records for which we can use that form to describe them.

The element defines each attribute that can be used to describe a record of the type of the parent element. Each element can have a  and a element. These two elements are normally used to name and describe the field presented to the user. It also includes a required element that relates a field to an attribute that describes the instance record.

Lets take that example:

In this example, the field is related to the geonames:name attribute. This means that the value of this field will be used as the value of the geonames:name attribute, so we would end-up with a triple:

  

control
The control attribute of the element is used to specify what is the HTML input form control that should be used to handle this field. This value can be one of:


 * 1) text. This is a single line input text box.
 * 2) textarea. This is a multi-lines input text box with possible scroll-bars.
 * 3) resource. This is a single line input text box where the value is a reference to another instance record.
 * 4) separator. This is a section header that is used to split cluster of attributes. The prefLabel of this field can be used as a section title.


The  element is used to specify a preferred label we would like to use to refers to this thing in a user interface. A  element can be used to describe a or a element.

The element is used to specify a description we would like to use to describes this thing in a user interface. A element can be used to describe a or a element.

The element is used to specify the attribute that the field refers to. Check the section of this specification for more information.. A element can be used to describe a element.


The  element is used to specify the maximum cardinality of that attribute. If no maxValues, nor minValues attributes are defined for a field, it means that no cardinality restrictions can be applied to it (i.e it can have no, or an infinite number of values).


The  element is used to specify the minimum cardinality of that attribute. If no maxValues, nor minValues attributes are defined for a field, it means that no cardinality restrictions can be applied to it (i.e it can have no, or an infinite number of values).

The element is used to specify an enumeration of possible values to use as a value, for the property represented by this field. All the values are displayed in a drop-down selection box.

Here is an example of how the field can be defined:

Note: the element is only effective with a fields of control type.

An Example
Here is an example that describes a set of forms. Such a file is used by structCreate and structUpdate to let users create, or update, instance records of these types in a OSF-Drupal node.