Main -> Documentation -> OCLC SiteSearch Record Builder -> Customizing DC Templates -> Removing Elements from a DC Template

Removing Elements from a DC Template

 

Contents

Introduction
Document Conventions
Procedure


Introduction

This document explains how to remove elements to from a Record Builder DC (DC(2) or DCQ) template by modifying the database's template.xml and field.xml files (click here for DC(2); click here for DCQ), as well as other database framework files. You can remove elements included in the DC templates shipped with SiteSearch 4.1.1 or 4.1.2 (elements in the Dublin Core Metadata Element Set).

Removing existing elements is one of the supported customizations to DC templates. Ideally, you should remove new elements to a database framework before you add any records to the database.

Note:  

Before you remove an element from an existing database, verify that the records in the database do not contain data for the element.


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. In a tag used to specify an element, the namespace precedes the element's name and a colon separates the namespace and the element, such as DC:Title or RB:Info.
  • element_name is an element's name.

Procedure

Follow this procedure to remove one or more elements to a DC template. In this procedure, you:

Backing up Database Framework Files

1. Back up each of these files:

  • <WebZ_root>/dbbuilder/dbs/db_name/template.xml
  • <WebZ_root>/dbbuilder/dbs/db_name/field.xml
  • <WebZ_root>/dbbuilder/dbs/db_name/constant.xml (if there is constant data defined for the element(s))
  • <WebZ_root>/dbbuilder/dbs/db_name/db_name.dtd
  • <WebZ_root>/dbbuilder/dbs/db_name/db_name.dsc
  • The database's configuration file in <WebZ_root>/ini/dbs/

Removing the Element(s) from template.xml

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

Go to template.xml example Click here for an example of the template.xml file in a second browser window. Pay particular attention to the element definition in the example.

3. Remove the entire element definition from template.xml, from its opening tag (such as <DC:Identifier>) through its closing tag (such as </DC:Identifier>).
4. Repeat step 3 for any other element definition you want to remove.
5. Save and close template.xml.

Removing the Element(s) from field.xml

6. Open <WebZ_root>/dbbuilder/dbs/db_name/field.xml with a text editor.

Go to field.xml example for DC(2) Click here for an example of the field.xml file for DC(2) databases in a second browser window.

Go to field.xml example for DCQ Click here for an example of the field.xml file for DCQ databases in a second browser window.

Pay particular attention to the element definition in the examples.

7. Remove the entire element definition from field.xml, from its opening tag (such as <DC:Identifier>) through its closing tag (such as </DC:Identifier>).
8. Repeat step 7 for any other element definitions you want to remove from field.xml.
9. Save and close field.xml.

Removing Index Definitions for the Element(s)

10. Remove the indexes you defined for the element in the database's configuration file in <WebZ_root>/ini/dbs. For each index:

11. For each element you are removing from the template, comment out its indexes in the database's .dsc file (<WebZ_root>/dbbuilder/dbs/db_name/db_name.dsc).

Removing Element(s) from the .dtd File

12. For each element you are removing from the template, comment out its line in the database's .dtd file.

Removing Constant Data for the Element

13. Is there constant data defined for the element(s) in the database's constant.xml file?

  • Yes.
    • Open <WebZ_root>/dbbuilder/dbs/db_name/constant.xml with a text editor. Go to constant.xml example Click here for an example of the constant.xml file and the general layout of an element's section in constant.xml in a second browser window.
    • Remove each element's section from constant.xml, beginning with its opening tag (such as <DC:Identifier>) through its closing tag (such as </DC:Identifier>).
    • Save and close constant.xml.
  • No. Go directly to step 14.

Verifying Template Changes

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

15. Open Record Builder with a Web browser. From the New Record screen, click the link for creating a new record for the database.

16. Verify that the Edit Record screen no longer contains fields for the elements you deleted.

Return to Contents


See Also

Planning a New DC Database
Record Builder Database Frameworks
Record Builder Database Framework Files


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

Last Modified: