Main -> Documentation -> Open SiteSearch Record Builder -> Customizing DC Templates -> Creating or Disabling Constant Data

Creating or Disabling Constant Data for a DC Database

 

Contents

Introduction
Document Conventions
Creating and Activating Constant Data
Creating Multiple Constant Data Files
Disabling Constant Data


Introduction

Beginning with SiteSearch 4.1.2, you can make constant data available to metadata specialists who create and edit records in local DC databases using OCLC Database Builder's Record Builder application. This document includes procedures for creating a single constant data file, creating multiple constant data files for the same database, and disabling constant data.


Document Conventions

  • <WebZ_root> refers to the location of the SiteSearch environment that includes Record Builder.
  • db_name is a database's top-level directory, typically <WebZ_root>/dbbuilder/dbs/db_name.
  • namespace refers to an element's XML namespace, an identifier used to ensure uniqueness among XML elements with the same name. Reserved namespaces used in DC templates are DC, RDF, MANTIS, and in SiteSearch 4.1.1, RB.
  • element_name is an element's name.
  • DC database refers to a database based on one of Record Builder's Dublin Core database frameworks – DC(2) or DCQ.
  • "You" refers to a person responsible for Record Builder system and/or database administration

Creating and Activating Constant Data

Follow this procedure to create and activate constant data for a DC database. It has two parts: creating a constant data file and activating the constant data.

Creating a Constant Data File

1. Determine the elements for which you want to define constant data and the constant data value for each element. An element's constant data values may include the element's data value and the scheme and qualifier used to refine and clarify this value.

2. Open <WebZ_root>/dbbuilder/dbs/db_name/constant.xml with a text editor.

3. Between the <DC> and </DC> tags, add a section for the first element for which to want to create constant data. You can copy and edit one of the existing sections in constant.xml, or use this pattern:

<namespace:element_name>
   <RDF:Value>element_value</RDF:Value>
   <DC:Scheme>
       <RDF:Value>scheme_value</RDF:Value>
   </DC:Scheme>
   <DC:Qualifier>
      <RDF:Value>qualifier_value</RDF:Value>
   </DC:Qualifier>
</namespace:element_name>

Go to constant.xml Example Click here for more information about each line in this section and its relationship to the constant data for the element that appears on the Edit Record screen. (This information appears in a second browser window.)

Notes:  

(1) The scheme_value and qualifier_value must be defined in the database's field.xml file.

(2) If this is a DC(2) database and the element has no qualifier values, omit the <DC:Qualifier> section.

(3) For a DCQ database, these values override the default scheme and qualifier values specified for the element in <WebZ_root>/dbbuilder/dbs/db_name/field.xml.

4. Repeat step 3 for any other elements for which you want to define constant data.
5. Remove any unneeded constant data sections in the file, such as those used for the sample constant data shipped with SiteSearch 4.1.2.
6. Save and close constant.xml.

Activating Constant Data

7. Open the database's configuration file (in <WebZ_root>/ini/dbs) in a text editor.

8. Add the following line to the [tDefault] template definition section:

constantxml = <WebZ_root>/dbbuilder/dbs/db_name/constant.xml

9. Do you want metadata specialists to add constant data to a record manually or automatically?

  • Manually. Add this line to the [tDefault] section:

    ApplyConstantData = Manual

  • Automatically. Add this line to the [tDefault] section:

    ApplyConstantData = Auto

Note:  

The default value for the ApplyConstantData variable is Manual.

10. Save and close the database configuration file.

11. Stop and then restart Record Builder. Click here for more information for UNIX; click here for more information for Windows NT.)

Return to Contents


Creating Multiple Constant Data Files

You can create more than one constant data file for a database and associate each file with a different workform. Each workform is based on the same template; the only difference between workforms is their constant data files. By selecting the appropriate workform on Record Builder's New Record screen, metadata specialists can apply the desired set of constant data to a new record.

1. For each constant data file, determine the elements for which you want to define constant data and the constant data value for each element. An element's constant data values may include the element's data value and the scheme and qualifier used to refine and clarify this value.

2. Copy and rename the database's first constant data file, <WebZ_root>/dbbuilder/dbs/db_name/constant.xml.
3. Follow steps 3-6 in the procedure Creating and Activating Constant Data.
4. Repeat steps 1-3 above for each constant data file that you want to create.

5. Open the database's configuration file (in <WebZ_root>/ini/dbs) in a text editor.

6. If necessary, create new template definition(s) so you have workforms for each constant data file:

  • Add the template's name to the [templates] section.
  • Add a corresponding [ttemplate_definition] section for the new workform. Copy the section for [tDefault] and then rename it, using the name you used in the [templates] section.
  • Edit the name and longname variables. Do not edit the template, fieldxml or tagfile variables. Keep the same values for these variables as those in [tDefault].
  • Edit the value of the constantxml variable to point to the name of the constant data file you defined in step 1 of this procedure.
  • Edit the value of the ApplyConstantData variable, as follows, to indicate whether you want metadata specialists to add constant data to a record manually or automatically:

    • Manually. ApplyConstantData = Manual
    • Automatically. ApplyConstantData = Auto

    Note:  

    The default value for the ApplyConstantData variable is Manual.

  • Repeat these steps for each constant data file you defined in steps 1-4.
7. Save and close the database configuration file.
8. Stop and then restart Record Builder. Click here for more information for UNIX; click here for more information for Windows NT.)

9. Open Record Builder with a Web browser. Then click the workform link for creating a new record for the database. When the Edit Record screen displays, verify that the constant data you added appears properly. If you configured the workform for manual application of constant data, select Apply constant data from the Available actions list.

Return to Contents


Disabling Constant Data

1. Open the database's configuration file (in <WebZ_root>/ini/dbs) in a text editor.

2. Find the template definition section ([ttemplate_definition]) for the workform for which you want to disable constant data. Comment out or delete this line:

constantxml = <WebZ_root>/dbbuilder/dbs/db_name/constant.xml [or other constant data file name]

3. Repeat step 2 to disable constant data for another one of this database's workforms.
4. Save and close the database configuration file.
5. Stop and then restart Record Builder. Click here for more information for UNIX; click here for more information for Windows NT.)

Return to Contents


See Also

Record Builder and Constant Data
constant.xml File for DC Databases
Performing Online Updates to Local Databases with Record Builder
Planning a New DC Database


[Main][Documentation][Support][Technical Reference][Community][Glossary][Search]

Last Modified: