the XML description format of GenB structure files is described below.
XML file structure:
<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet href="http://www.inte.es/code/genbExport.xsl" type="text/xsl"?>
<genb creator_name="Demo" creator_surname="Demo" creator_company="Inte" date="2003-06-20 09:06">
<user uid="12339123c80123ba6112312312312378" url="http://www.test.com" xml:lang="en">
<template name="generica" template_id="1">
<template_name xml:lang="en">template A</template_name>
<url_list xml:lang="en">/demo/index.php</url_list>
<url_detail xml:lang="en">/demo/detalle.php</url_detail>
<label id="1" label_type="short text" show_in_admin_list="1" email="0">Title</label>
<label id="2" label_type="text" num_rows="10">Contents</label>
<label id="3" label_type="document">File</label>
<label id="4" label_type="image">Image_1</label>
<label id="5" label_type="closed list" list_style="drop down menu">Option_class</label>
<closed_list id="1" label="Tipo_Opcion" xml:lang="en" status="1">option A</closed_list>
<closed_list id="2" label="Tipo_Opcion" xml:lang="en" status="1">option B</closed_list>
<closed_list id="3" label="Tipo_Opcion" xml:lang="en" status="2">opción C</closed_list>
</template>
<template name="generica" template_id="2">
...
...
</template>
...
...
</user>
</genb>
genb: [required] open and close the contents site. Informative attributes such as "creator_name", "creator_surname",... are available.
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.
template: [required] open and close the set of contents that define the structure of 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: 'generic'; 'productogen' (product); 'actualidadgen' (news); 'registrogen' (registries).
2.- template_id: [optional]unique identifier of the data template. If template_id is omitted in an import process, the system treats the data template as if it were new. Otherwise, if the identifier is given and it exists, the system will try to update whenever possible.
template_name: [optional] delimits the contents corresponding to the name the user gives the "template".
Location: forms a direct part of the 'template' contents. Its position within the contents template does not matter.
The attributes that it can contain are:
1.- XML:lang: [optional] language used in the template name. If the attribute is omitted, the system will choose the first language (default language) used by the user. There may be as many template_name as languages used for the data.
Url_list: [optional] delimits the contents corresponding to the root path where the preview template to be used with lists is located.
Location: forms a direct part of the 'template' contents. Its position within the contents template does not matter.
The attributes that it can contain are:
1.- XML:lang: [optional] language used for the template url_list. If the attribute is omitted, the system will choose the first language (default language) used by the user. There may be as many url_list as languages used for the data.
url_detail: [optional] delimits the contents corresponding to the root path where the preview template file to be used in detail views is located.
Location: forms a direct part of the 'template' contents. Its position within the contents template does not matter.
The attributes that it can contain are:
1.- XML:lang: [optional] language used for the template url_detail. If the attribute is omitted, the system will choose the first language (default language) used by the user. There may be as many url_detail as languages used for the data.
label: [optional] defines a template field. The "label" delimits the contents corresponding to the name of the "label" field. The "label" or field name allows a contents field to be unmistakably identified within a data "template".
Location: forms a direct part of the 'template' contents. Its position with respect to other "labels" determines the order in which it appears in the data template contents form treated.
The attributes that it can contain are:
1.- id: [optional] unique field identifier. If the atribute 'ID' is given, in an import process, the system will proceed to update the "label" field definition. If the identifier attribute is omitted, the system first tries to locate and identify the field using the name. If the field is identified, it proceeds with updating. If the field does not exist, it proceeds to insert.
2.- label_type: [required] identifier that designates the type of data the field will contain. The values possible for this attribute are:
attribute |
description |
associated attributes |
short_text |
maximum length of text 100 characters. |
email, show_in_admin_list |
text |
unlimited text length |
num_rows |
closed_list |
closed values list |
list_style, show_in_admin_list |
open_list |
maximum length of text 100 characters. In the contents management form it always appears accompanied by a drop-down menu with all the values used in the set of records of the data template treated. |
email, show_in_admin_list |
image |
field for picture file management. Types admitted are: 'image/gif', 'image/pjpeg', 'image/jpeg' |
|
document |
field for document file management. Types admitted are: 'video/quicktime', 'video/x-msvideo', 'application/x-troff-msvideo', 'video/avi', 'video/msvideo', 'video/x-ms-asf', 'application/x-mplayer2', 'video/x-ms-asf', 'video/x-ms-asf-plugin', 'application/x-zip-compressed', 'application/zip', 'application/pdf', 'application/msword', 'application/vnd.ms-excel' |
|
3.- show_in_admin_list: [optional] attribute for indicating the presence of the field in the contents management lists. This attribute is valid for label_type fields: "short text" and "open list".
the values possible for this attribute are: 1 -> show, 0 -> hide (default).
4.- email: [optional] attribute to indicate that the field contents correspond to an e-mail. Data templates that contain fields designated as "email" allow e-mail addresses to be copied from management lists into distribution lists. The values possible for this attribute are: 1 -> yes, 0 -> no (default).
5.- num_rows: [optional] attribute to indicate in label_type fields: "text", the number of rows visible in the text box that appears in the contents management forms. The values possible for this attribute are: Whole value, e.g..: 15
6.- list_style: [required] attribute to indicate in label_type fields: "closed list", the format of the closed list to be used in the contents management forms. The values possible for this attribute are: "checkbox", "multiple select", "drop down-menu" and "radio button". closed_list: [optional] delimits the content corresponding to the options in the 'closed_list' field. 'closed_list' type fields are made up of various options. Closed_list labels enable the set of options associated with a closed list field to be defined.
Location: forming a direct part of the usual 'template' contents, after the definition of the "closed_list"-type 'label' field which it will reference with the 'label' attribute.
Its position with regard to other 'closed_lists' determines its order of appearance.
the attributes it may contain are:
1.- id: [optional] unique identifier. If the 'id' attribute is given, during an import process, the system will proceed to update the option in the closed list. If the identifier attribute is omitted, the system will proceed to insert.
2.- label: [required] unique identifier for the "closed_list"-type 'label' field with which the option is associated.
3.- xml:lang: [optional] language used for the 'closed_list' contents. If this attribute is omitted, during an import process, the system chooses the first language (default language) employed by the user.
4.- status: [optional] attribute that designates the status of the option. If the attribute is omitted, during an import process, the system will take the default value 1 ->active. Inactive status indicates an option in disuse, that is, a visible contents management site option, but hidden when it is used in preview templates (web site). The values possible for this attribute are: 1 -> active (default), 2 -> inactive. |