Home > INTERWOVEN > Creation of Data Capture Templates(DCT)

Creation of Data Capture Templates(DCT)

May 25, 2010

There is a DCT for each data type and should be present inside the directory of the data type. A DCT is an XML configuration file named datacapture.cfg.

This DCT contains the definition of data type itself i.e. the information the data type will contain. For example the sports_news data type can consist of a Paragraph containing text(News item) and an associated image(News image).

The DCT contains the tags corresponding to these data for data type sports_news. When a Data Content record is to be generated, the Data Capture Subsystem of TeamSite Templating interprets the tags in DCT and presents a form to the content contributor which can be filled up to capture data.

All the DCT use the following DTD which is specific to TeamSite Templating

/iw-home/local/config/datacapture5.0/dtd

The DTD has all the data elements which can used top create the DCT.

We will build a DCT step by step for data type sports_news assuming that each sports news needs the following information:

1. Heading

2. Description – Can be present as multiple paragraphs, but at least one Paragraph long

3. Image

DCT

—data-capture-requirements ,tag encloses the entire DCT. Attribute ‘type’ is mandatory here. This can have values as ‘content’, ‘metadata’ or  ‘workflow’. For Templating datacapture files we use ‘content’.This tag is MANDATORY.

—ruleset, tag encloses all the items in the DCT. The value of attribute ‘name’ forms the caption of data capture form displayed. This tag is MANDATORY.

—description, tag is OPTIONAL. It holds the description about the DCT which gets displayed at the top of the data capture form.

—container, tag represents a set of subelements.

—The <item> element is used to assign a user defined name to an element type.

—The information contained in <label> is displayed as the field name in data capture form.

—Instances of <text> are used to display single line text boxes. <text> can have following attributes –

1. required

2. maxlength

3. size

4. validation-regex – This is used to restrict the format of input text i.e. It is used to validate the input text. Regular Expressions are used to

validate an input. E.g. A valid three digit number can be validated as:-

o    validation-regex=”[1-9][0-9][0-9]”

Tag <browser> is used to enable a file browser so that content contributor can easily select an image. Following is a description of the attributes:

1. required – value is ‘t’ if mandatory

2. ceiling-dir –  It sets a limit for the directories to be browsed. A user can browse the directories above this directory only

3. initial-dir – This is the initial directory

4. extns – Images with extensions specified here will only be available for selection

A <replicant> represents a repeatable section in a DCT. It can contain a list of one <item> tags. But vice-versa does not hold true. Tag <replicant>

can have following parameters:

1. min – Used to specify the mininmum number of instances of the replicant list.

2. Max – Used to specify the maximum number of instances of the replicant list.

3. Default – Used to specify the default number of instances of the replicant list.

4. Hide-name – This will determine whether the label gets displayed for the sub-items.

In addition to the tags mentioned in the DCT above there are other tags also which can be used. Some of the commonly use are listed below-

1. <textarea>

2. <radio>

3. <checkbox>

4. <select> – This will contain a list of <option> tags nested inside it.

5. <hidden>This contains a value invisible to the user.

6. <readonly> – This will display the item as readonly.

7. <allowed> – This is used to enable or disable an item depending on the user’s role.

This will contain one or more <cred> tags nested inside it. Here is an illustration-

This above set of tags will present <text> only to the user with role as Administrator.

We can also form complex access statements by using <and>, <or> and <not> tags. E.g. If we want to restrict access to Author or Editor roles then

we cab specify the following –

Creation of DCRs in my Next Post.

Categories: INTERWOVEN Tags: ,
%d bloggers like this: