A data type is a construct that is defined within the desktop database. For example, here is the definition of the XWD data type. The definition is in the configuration file /usr/dt/appconfig/types/language/xclients.dt:
DATA_ATTRIBUTES XWD
{
ACTIONS Open,Print
ICON Dtxwd
NAME_TEMPLATE %s.xwd
MIME_TYPE application/octet-stream
SUNV3_TYPE xwd-file
DESCRIPTION This file contains a graphics image in the XWD \
format. These files are typically created by \
taking snapshots of windows using the XwdCapture \
action. Its data type is named XWD. XWD files \
have names ending with `.xwd' or `.wd'.
}
DATA_CRITERIA XWD1
{
DATA_ATTRIBUTES_NAME XWD
MODE f
NAME_PATTERN *.xwd
}
DATA_CRITERIA XWD2
{
DATA_ATTRIBUTES_NAME XWD
MODE f
NAME_PATTERN *.wd
}
Every data type definition has two parts:
DATA_ATTRIBUTES--describes the appearance and behavior of the data type.
DATA_CRITERIA--specifies the rules (naming or content) for categorizing a file as belonging to that data type.
The DATA_ATTRIBUTES_NAME field connects the criteria to the attributes.
There can be multiple DATA_CRITERIA for a DATA_ATTRIBUTE. For example, the XWD data type has two criteria to specify two different naming criteria (NAME_PATTERN)--names ending with .xwd or .wd.