About DCLs and Metadata Schemas

3 Managing Metadata 3-1 3 Managing Metadata This chapter discusses the following topics about managing repository metadata with schemas, rules, and profiles: ■ Using Schemas to Customize Metadata on page 3-1 ■ Using Profiles to Customize Content Screens on page 3-12

3.1 Using Schemas to Customize Metadata

This section covers these topics: ■ About DCLs and Metadata Schemas on page 3-1 ■ Schema Hierarchical Structure on page 3-2 ■ Tables on page 3-3 ■ Views on page 3-4 ■ Relationships on page 3-4 ■ Sample Schema-Based Option Lists on page 3-5 ■ Directory Structure for Schema on page 3-5 ■ Building a Basic Schema on page 3-6 ■ Modifying the Publishing Cycle Interval on page 3-8 ■ Schema Example: Dynamic Option Lists on page 3-9 ■ Schema Example: Recursive Table for Multiple Trees on page 3-11

3.1.1 About DCLs and Metadata Schemas

The Information Fields tab of the Configuration Manager enables you to create custom metadata fields with option lists. Additionally, you can structure an information field to make its associated option list dependent on another information field’s option list. This organization is called a dependent choice list DCL. For example, assume there is an option list for a Country information field and another option list for a State information field. The available choices in the State option list would be dependent on which country was selected from the Country option list. The metadata schema mapping feature is similar to the dependent choice list function in that a hierarchical structure can be created for information field option lists. However, the metadata schema mapping is more versatile. Option list views can be easily adjusted to accommodate localization requirements. 3-2 Application Administrators Guide for Content Server The Content Server metadata schema mapping feature involves the structure that is set up and used to manage information lists and corresponding option lists. A metadata schema defines the option lists contained in database tables, the available choices values in the table columns, and dependencies relationships between the choices and option lists. Schemas can be complex to set up. If you have any questions prior to setting up a schema, contact Consulting Services to review your plans. This section covers the following topics: ■ Schema Hierarchical Structure on page 3-2 ■ Schema Elements on page 3-3 ■ Sample Schema-Based Option Lists on page 3-5 ■ Directory Structure for Schema on page 3-5

3.1.1.1 Schema Hierarchical Structure

A schema is a collection of related schema objects. The term schema also refers to a graphical depiction of the database hierarchy that is created to support the Content Server metadata schema mapping feature. The schema hierarchical structure consists of tables and their respective columns or fields, views of the data, and the relationships between them. The Country and State example can be continued to more fully describe a schema hierarchy. Additional information fields City, Region, and Area Code are included to illustrate a three-tiered dependency structure. In Figure 3–1 , the sample basic schema hierarchy, one independent field has two dependent fields. Each dependent field also has a dependent field. These dependencies are also referred to as ParentChild relationships. Figure 3–1 Basic Schema Hierarchy Example Note: Because Internet Explorer 5.0 does not support DHTML, any DCLs created using the Content Server schema mapping feature do not display the option list values. This is not an issue with Internet Explorer 6.0. When using schemas with Content Publisher, wrapping a query page in a table causes an error in Internet Explorer. This is caused by the interaction of schema with the page. Managing Metadata 3-3 This three-level schema hierarchy produces five distinct metadata fields: Country, State, City, Region , and Area Code. Each field presents a specific option list to the user. The contents of the option lists are contingent on whether the information field is dependent or not. Thus, the following option lists result from the sample basic CountryStateZip schema hierarchy: ■ The Country option list is independent and the choices remain constant. ■ The choices available in the State option list are variable and depend on which country the user selects from the Country option list. ■ The choices available in the City option list are variable and depend on which state the user selects from the State option list. ■ The choices available in the Region option list are variable and depend on which country the user selects from the Country option list. ■ The choices available in the Area Code option list are variable and depend on which region the user selects from the Region option list

3.1.1.2 Schema Elements

Schemas are comprised of: ■ Tables ■ Views ■ Relationships

3.1.1.2.1 Tables Schema tables are database tables that store the choices displayed in

information field metadata option lists. Tables and their columns are created using the Tables tab see Configuration Manager: Tables Tab on page A-46. Multiple columns can be created in each table but at least two are essential for producing dependent choice lists: ■ The common column name used to create the dependency between one option list and a second option list that is dependent on the choice made from the first for example, Country and State, respectively. ■ The column that stores the choices for metadata option lists. Figure 3–2 Schema Tables Example Using the geographical example Country, State, City, Region, Area Code in the three-tiered schema hierarchy, a table must be created for each branch in the schema tree structure. Additionally, the dependent tables child tables must contain a column that corresponds to an identical column in the table to which it is subordinate the 3-4 Application Administrators Guide for Content Server parent table. These corresponding columns are used to create the dependencies between the two tables and are ultimately used to generate the dependent choice lists. For example, the tables in Figure 3–3 illustrate how the Country and State table columns might be populated. The data in each name column provides the choices available on the option lists. The relationship that is created between the corresponding columns in the Country and State tables countryID determines what choices are displayed in the State metadata option list. Figure 3–3 Populated Schema Tables

3.1.1.2.2 Views A view is a tailored presentation of the corresponding table. Views do

not contain data, but they derive data from their tables. Views are used to simplify a database for use and to present data in a different perspective. A view consists of a list of properties and associated display rules. Each table in the schema must have an associated view. Views provide information about these items: ■ Specific columns in the table included in the schema. The selected columns are used to establish the dependencies between tables and also to generate the dependent choice lists. ■ Internal and external column names. ■ User interface display characteristics. ■ Editing and sort order criteria.

3.1.1.2.3 Relationships Relationships define the dependencies between tables and are

essential in generating the appropriate dependent choice lists. Each defined relationship establishes the correspondence between parent and child tables. This correspondence is created by specifying the column in the child table that is dependent on the column in the parent table. Thus, the choices displayed using column data from the child table are contingent on the choice made from the corresponding column data from the parent table. Managing Metadata 3-5 Figure 3–4 Table and Column Relationships For example, in Figure 3–4 , the CountryView Country table and the StateView State table use the countryID column to create a relationship that generates a parent country list and a child state list. This means that the choices available in the State metadata option list are dependent on the choice made in the Country metadata option list.

3.1.1.3 Sample Schema-Based Option Lists

After the schema tables, views, and relationships are created and properly established, the option lists display the appropriate choices. For example, in Figure 3–5 , the Country option list now displays two choices: United States and Canada. Figure 3–5 Option List Example Because the State metadata field is contingent on the Country field, the State option list contains items based on the choice made in the Country option list. In this case, if the United States choice is selected, the State option list displays Minnesota and Wisconsin as choices. If Canada had been selected, then the State option list would display Ontario and Quebec. Figure 3–6 Dependent Option List Example

3.1.1.4 Directory Structure for Schema

Three subdirectories are associated with the Schema function: ■ schema ■ schema.work 3-6 Application Administrators Guide for Content Server ■ schema.old These are located in the weblayoutresources directory. The schema.work directory is usually not listed because it is a temporary directory. When the schema creation process completes, the directory is renamed. If this directory exists it indicates one of the following: ■ A large schema rebuild is in progress ■ The schema is created, but there is a problem with the schema structure.

3.1.2 Creating Schemas