[Inso Home Page] [Home] [Collection] [Book] [Expand] [Collapse] [Search Forms] [Previous Section with Hits] [Next Section with Hits] [Clear Search] [Preferences] [Print] [Help]

 inside  Expand Search


   The dwCollection Command   [Table of Contents]    Enabling Collection Level Search Forms

DynaWeb Publishers Guide

[-] 4. Managing DynaWeb Collections
[-] Grouping Collections in DynaWeb

Grouping Collections in DynaWeb

Introduction

DynaWeb allows publishers to group their collections through the use of nested configuration files. This is useful for setting up collections to easily share a common layout or functionality of the server. You can group collections under a common heading by adding a collection to the dwCollectionList that points to another configuration file instead of an actual collection. This secondary configuration file (referred to as a nested configuration file) contains its own dwCollectionList command. This dwCollectionList command specifies the names and locations of the collections that will be listed as members of the group.

Collections may belong to more than one group. In this manner, a single source book may have different routes of access that result in a different display or organization, depending on the configuration files accessed by the request. This will be explained in more detail later in this chapter.

Example of Nested Configuration Files

Here is a hypothetical example to explain the idea behind nested collections.

You have a group of DynaText collections that will be accessed by both children and adults. You decide that you want some of your collections in a "Adults" section and the other books in a "Children" section. You also have some collections that you want to display in both sections.

The Children section will feature books with bright blue backgrounds and a prominent Help button. The Adults section, on the other hand, uses plain white backgrounds; but you want your readers to be able to search the collections for related information.

To accomplish this, you can set up your main configuration files to point users to different configuration files depending on which section they want to view. Each nested configuration file is then modified to add or hide the features each collection should possess. The nested configuration files also determine which collections are viewable. See the illustration below for an overview of this example:

Figure 4-1: Example of Nested Configuration Files

raster

Using Nested Configuration Files

Nested configuration files are files located at different levels of the collection structure. Configuration files that modify the layout or the behavior of the server module only affect collections and books that reside below them in the configuration hierarchy. The main configuration files affect all of the books and collections served by the server module, since they are considered to be at the "top" of the hierarchy.

Configuration File Hierarchy

Configuration files in DynaWeb have their own system of authority. In loose terms, the closer a configuration file is to the book or collection being served, the more control that file exerts. As you advance through the configuration file hierarchy and the power of a configuration file increases, its scope, or range of authority, decreases.

At one end of the scale are the main configuration files. They control the layout and behavior for all of the collections and books served out by DynaWeb. But if a collection or a book has a specific configuration file that has been modified, it will override the main configuration file and set its own behavior. The main configuration files have the greatest scope, but the least authority.

At the other end of the scale are book-level configuration files. Their scope is extremely limited, as they can only affect the specific book they reside in. However, their authority is unmatched, because they are able to override any other configuration files that attempt to modify their behavior.

As DynaWeb constructs a response to a request, it constructs a list of the configuration files it touches during the path to its destination. After the requested information's location is determined, DynaWeb constructs a response by revisiting each configuration file it has placed in the list and determining which ones have authority. The table below shows the general makeup of the configuration files a request might encounter and what the relative authority and scope of those configuration files might be.

Configuration File

Location

Scope

Authority

Main Configuration Files

/data/config directory

All collections and books

Cannot override any other .dwc file.

Nested Configuration Files

no set location

Any collection included in local dwCollectionList command

Can override main .dwc files and any other .dwc files cached before the current one.

Collection-Level Configuration Files

Placed at the level of the books directory inside a collection.

Can modify all books inside collection

Can override any .dwc file except book-level .dwc files.

Book-Level Configuration Files

Placed at the level of the ebt, figures, and index directories inside the book.

Only modifies the book it resides in.

Can override any other configuration file

Creating a Nested Configuration File

Placing Configuration Files

Unattached Configuration Files

Configuration files do not have to be attached to a specific collection or book. You can use a nested configuration file to provide a specific "look and feel", or to restrict searches to a specific subset of collections without actually placing the configuration file with the collection(s). By using absolute paths when referring to the configuration file and the nested collections, the nested configuration file does not need to reside with the collections it modifies.

Collection-Level

For collection-level configuration files, the file is placed in the collection directory. If you modify any templates or scripts in a collection-level configuration file, the changes will only affect the books contained in the collection. The configuration file can take the name of the collection (i.e., dwebdoc.dwc) or can remain dynaweb.dwc.

Book-Level

When placing a configuration file in a book, the file is placed inside the book's directory, at the same level as the ebt, figures, and index directories. Unlike collection-level configuration files, the name of the file must be dynaweb.dwc.

Configuration files placed at the book level only affect the book. The contents of the book-level configuration file override any other configuration files.

Referencing a Nested Configuration File

Nested configuration files are registered with the server module by including them in a dwCollectionList command in the main configuration file. The dwCollection command's location parameter for the nested configuration file needs to end with the name of the configuration file. The type parameter, if included, must have a value of DwConfigFile.

Example:

dwCollection group1 {
   title          "Medical Collections"
   location       /pro/dynaweb/collections/medical.dwc
   type           DwConfigFile
}

   The dwCollection Command   [Table of Contents]    Enabling Collection Level Search Forms