The Templates Root Folder

The files contained directly in the root of the template's folder are used to describe the metadata about the template file itself. These are the file-level properties for the template and contain information about the template itself. All of the files listed in the root level of the structure are required to be in the template. The following table describes each of these in more detail.

Object Name Description

[Content_Types].xml Describes the types of data files that are stored within this tem plate file. More accurately, the content types XML file knows the extensions of all of the files stored within the template the file itself. For example, viewing the contents of the file reveals XML nodes like this:

<Default Extension="txt" ContentType="text/ plain" />

Certain file types, such as .exe, are not allowed in an Office Open XML file format. When the package is opened, the extensions are verified and if there are any additional or undefined extension types in the file that are not described by the content types, the entire package is invalidated for security purposes.

docProps folder Contains the core.xml file that describes the template's file level properties. It can contain any nodes that a developer wants to include, but three specific nodes are reserved for string data about the template. When the template file is opened in Getting Started, the following properties stored in core.xml are shown:

dc:title: The name of the template, which will be shown in the Preview pane. It's also the default database name when the template is opened in Getting Started.

dc:decription: A short description about the template, which is also shown to the user in the Preview pane.

cp:category: This is the category of the template, which will be defined by the individual developer. This string will be displayed in the preview pane. Additionally, this is the string used for the category name of the template for getting started (which will be discussed below in the information for deploying templates).

template folder Contains all of the files used to create the particular database from the template. Everything in this folder is specific to the database that will be created. This is the second level of the structure and will be discussed further in the following section.

Table continues on the next page

Object Name Description rels folder Contains all of the .rels files that describe the relationships of the files within this file package. The root level of the template file structure hierarchy is a single file called .rels that relates the other three objects:

The CoreDocumentProperties metadata for the file, which maps to core.xml.

The PreviewImage property for the file, which maps to the preview image stored in the template folder. (Remember, the types of file for this image must be defined in the [Content_Types].xml file.)

The Template data for the file, which maps to template.xml in the template folder.

All *.rels files always describe the relationships of the objects contained within the file package. Although the root of the template file contains only one RELS file, deeper levels of the file may have multiple RELS files for describing each of the different database objects, which you will see shortly.

Each of these objects is pretty straightforward and should be easy to understand. Each is required for the ACCDT file format and if any are missing, the template file will be invalidated. Although this metadata is required for the file, none of the information defines anything about the database created from the template. The real meat of the resulting database is based on the objects contained in the template folder.

0 0

Post a comment