Main -> Documentation -> OCLC SiteSearch Record Builder -> Customizing DC Templates |
Customizing
DC Templates
Contents Introduction
While the templates provided as part of the DC database frameworks (DC(2) and DCQ) shipped with the OCLC Database Builder's Record Builder application are generally suitable for creating and editing records in DC databases without any modification, you may need to customize a template for a specific database. "Customize a template" is a generic term for modifying a database's template.xml, field.xml, constant.xml, .dtd file, and/or database configuration files to produce a customized data entry workform (displayed on Record Builder's Edit Record screen) for online record entry and editing. This document briefly describes the reasons for customizing a template, when to customize a template, and supported customizations. It also explains the role of the files that you may modify when you customize a template. You should understand the role of each of these files before you modify them.
Reasons for Customizing a DC Template Some reasons for customizing a DC template include:
As you plan a new DC database, review the elements and qualifiers included in the DC database frameworks provided with Record Builder. If you need to modify the template, the best time to make these modifications is before you create the database and add any data to it. See Planning a New DC Database for more information. Record Builder supports a number of customizations to DC templates. The following table lists these customizations along with links to procedures that explain how to perform each of these customization tasks.
You can implement these customizations in any combination for a particular database. For example, you can add new domain-specific elements and remove qualifiers for existing elements in the same template. Other customizations may cause Record Builder to function erratically and may be incompatible with future upgrades to Record Builder. Roles of Files Modified in Template Customization Another document (The Record Builder Interface in Action) describes how the elements of the Record Builder interface work together to perform online updates to a local database. This section provides additional detail about how the following files contribute to creating a workform displayed on Record Builder's Edit Record screen: Except for the database configuration file, all of these files reside in the database's top-level directory, typically <WebZ_root>/dbbuilder/dbs/db_name. The template.xml file is a database's master XML template, and often its only workform. Click here for an example of a template.xml file in a second browser window. The example includes numbered callouts that describe key sections of this file. After an XML declaration statement, it includes Record Builder specific-statements that call hooks to populate the completed workform, as shown on the Edit Record screen, with constant data, values for drop-down lists, and buttons. Other statements create the administrative information about the record at the top of the workform. All of these statements must remain intact as shipped. Element specifications for each of the elements in the DCMES, version 1.1 (such as <DC:Title>, <DC:Identifier>, and so on), follow the <ID> element, in the format <DC:element_name>, where DC is the element's XML namespace and element_name is the element's name. Record Builder uses the statements in each element specification to create a data entry field for the element on the Edit Record screen. Statements define the label, type (textarea or listbox), display size, and maximum size of the data entry field and whether the data entry field is replicable (it can have more than one instance in a record). The element specification also indicates whether the element has schemes and/or qualifiers (modifiers in SiteSearch 4.1.1). When you add or remove elements for a DC database, you edit template.xml accordingly.
While the <DC:scheme> and <DC:qualifier> sections within an element specification indicate whether to include Scheme or Qualifier lists for the element on the Edit Record screen, the field.xml file contains the lists of values to be included in each list. Each element with schemes and/or qualifiers has a section in field.xml. The <DC:element_name></DC:element_name> tags delimit each section for a particular element. field.xml in DC(2) Database Framework Click here for an example of a field.xml file for a DC(2) database in a second browser window. The example includes numbered callouts that describe key sections of this file. The important things to note about the field.xml file for a DC(2) database are that:
field.xml in DCQ Database Click here for an example of a field.xml file for a DCQ database in a second browser window. The example illustrates the qualifier-scheme association in DCQ databases. The important things to note about the field.xml file for a DC(2) database are that:
You edit field.xml when you add or remove schemes or qualifiers for an existing element, create a new element with schemes and/or qualifiers, or remove an existing element.
A constant.xml file is optional. If it exists and the database's configuration file contains a reference to the file, it allows you to predefine values (element, scheme and qualifier) for any elements in the database. This allows metadata specialists to populate elements with identical values across many records. See Record Builder and Constant Data for more information. Click here for an example of a constant.xml file for a DC database in a second browser window.
The .dtd file (dc.dtd for DC(2) or dcq.dtd for DCQ) contains a list of all elements in template.xml (including elements in the DC, RB, and MANTIS namespaces) in the form namespace:element_name and their corresponding field numbers. A field number associates an element in template.xml with the tag path to this element in its BER record in the database. This allows Record Builder to place data from an existing record in the appropriate fields on the Edit Record screen and to store data entered on the Edit Record screen in the database. You edit this file when you add or remove elements from a template.
The .dsc file (dc.dsc for DC(2) or dcq.dsc for DCQ) includes definitions for the database's indexes. If you add new elements to a database template, you create index definitions for the elements in the .dsc file.
A DC database's configuration file includes references to the template.xml, field.xml, constant.xml, and .dtd files in its [ttemplate_definition] section. Since it also contains references to the indexes defined in the database's .dsc file, you edit this file when you create indexes for new elements.
See Also Planning
a DC Database |
[Main][Documentation][Support][Technical
Reference][Community][Glossary][Search]
|