the XML description format of GenB data files is described below.
XML data file structure:
<?xml version="1.0" encoding="iso-8859-1"?>
<genb creator_name="Demo" creator_surname="Demo" creator_company="Inte" date="2003-06-27 04:06">
<user uid="12339123c80123ba6112312312312378" url="http://www.test.com" xml:lang="en">
<source name="generica" id="111" template_name="template A" template_id="1" status="2">
<name>record based on template A</name>
<date>2003-06-18</date>
<item template_item_label="Title" template_item_id="1" xml:lang="en">GenB introduction</item>
<item template_item_label="Contents" template_item_id="2" xml:lang="en"><![CDATA[Lorem ipsum ...]]></item>
<item template_item_label="File" template_item_id="3">demo.zip</item>
<item template_item_label="Image_1" template_item_id="4">demo.gif</item>
<item template_item_label="Option_class" template_item_id="5" selected="1" active_option="1">option A</item>
<item template_item_label="Option_class" template_item_id="5" selected="0" active_option="1">option B</item>
<item template_item_label="Option_class" template_item_id="5" selected="0" active_option="1">option C</item>
</source>
<source name="generica" id="111" template_name="template B" template_id="2" status="2">
...
...
</source>
...
...
</user>
</genb>
genb: [required] open and close the contents site. It has informative attributes such as "creator_name", "creator_surname",...
user: [required] identify the user/site that the set of contents it holds come from.
Location: forming a direct part of the 'genb' contents.
The attributes that it can contain are:
1.- uid: [optional] unique identifier. If this attribute is omitted in an import process, the system will take the user in session by default.
2.- url: [informative] URL of the 'UID' web site.
3.- xml:lang: [informative] language used in the contents management site.
source: [required] open and close the set of contents of a record associated to a data "template".
Location: form direct part of the 'user' contents.
The attributes that it can contain are:
1.- name: [required] identifier of the module the data template belongs to.
Possible values: 'autenticacion' (module authentication); 'generica' (module generics); 'productogen' (module product); 'actualidadgen' (module news); 'registrogen' (module registries).
2.- id: [optional] unique record identifier. If the identifier attribute is omitted in an import process, the system will handle the source block as an insert. Otherwise, if the identifier is given and it exists, the system will try to update whenever possible.
3.- template_id: [optional]unique identifier of the data template in which source content is based. If template_id is omitted in an import process, the system will try to identify the data template based on "template_name" attribute.
4.- template_name: [optional] name of data template (name used as first language in contents management). Used as unique identifier when the data template identifier "template_id" is not used.
5.- status: [optional] attribute to indicate the publishing status of 'source' block record.
If the attribute is omitted, in an import process, the system will choose the default value 1 ->pending.
The values possible for this attribute are: 1 -> pending (default), 2 -> published, 3 -> retired. name: [optional] delimits the contents corresponding to the name/internal reference assigned to record by user.
Location: forms a direct part of the 'source' contents. Its position within the source contents does not matter.
It has not attributes.
date: [optional] delimits the contents corresponding to the date the user gives the record. The contents format is yyyy-mm-dd
Location: forms a direct part of the 'source' contents. Its position within the source contents does not matter.
It has not attributes.
item: [optional] open and close the contents of a field from a record or 'source'.
Location: forms a direct part of the 'source' contents. Its position within the source contents does not matter.
The attributes that it can contain are:
1.- template_item_id: [optional]unique identifier of the field associated to the record or 'source. If the "template_item_id" attribute is omitted in an import process, the system will try to identify the field based on "template_item_label" attribute.
2.- template_item_label: [optional] name of the field associated to the record or 'source'. Used as unique identifier when the "template_item_id" identifier is not used.
3.- xml:lang: [optional] language used in the field contents. This attribute is not valid in fields type "File", "Document", "Closed list". If the attribute is omitted, the system will choose the language designated by user, if it is a contents language or the first language used for contents. There may be as many items for same field as languages used for the data.
4.- selected: [optional] this attribute is only used in "closed_list" type fields.
The values possible for this attribute are: 0 -> option not selected (default), 1 -> option selected.
5.- active_option: [optional] informative attribute used exclusively in "closed_list" fields.
The values possible for this attribute are: 1 -> active option, 2 -> inactive option (obsolete).
NOTE: During importing, the contents in "closed_list" fields are used to locate the option and apply the value of the "selected" attribute. During the option identification process, the system uses the language designated by the 'user' if it is one of the contents languages, or as a last resort, the first language used in the contents. |