Tagging Content

For each item and screen in a title, information for all fields in the Item and Screen table must be supplied. To accommodate the needs of the widest range of content providers we devised two different methods of supplying screen and item information:

The Tags

To mark and describe the content we devised this set of text markers:

A Fully Tagged Item

Below is an example of a fully tagged item within a content file. This particular block of text will create an entry in the table of contents titled "Creating the Title Slide" and a screen of the same title that is displayed in our RTF viewer when the user clicks the table of contents item.

..ITEM:Creating the Title Slide

..ID:p2_c3_4

..PARENT:p2_c3_1

..TOCPOSITION:03

..ITEMTYPE:screen

..SCREENTYPE:rtf

..FILTERS:procedure,new

..PICTURE:

..HOTSPOTS:

..SKIMTEXT:

Start things off with the title slide. Create it using the Title Slide autolayout.

..TEXT:

New Feature! As shown in the ^.^Figure,@CH05_03.bmp& the Title Slide layout displays two text placeholders--dashed boxes that show the location for an object on a slide. All placeholders contain a prompt that tells you to click (or double-click) to add text, a graph, or

For every item there is at least one screen. Thus, the compiler creates a record in both the Item and Screen tables from this block of text. Some tags pertain to both records. For example. both records will have the same id and title (thus linking the screen to this item). Other tags pertain to only one record. For example, the FILTER tag sets data only in the Screen table. Notice that below the SKIMTEXT and TEXT tags there is formatted text. This text is parsed by the compiler and moved intact into memo fields in the Screen and Item tables.

The tags that have no text following them store a null in the corresponding database field. For example, when this block of text is processed, there will be no data in the field in the Screen table corresponding to the PICTURE and HOTSPOTS tags.

A Fully Tagged Screen

Below is an example of a fully tagged screen in an input file. This particular block of text creates a record for a bitmap that is stored in the file CH04_01.bmp. In the front-end, this bitmap will be displayed in our image viewer.

..SCREEN:Outline view

..ID:CH04_01.bmp

..SCREENTYPE:image

..FILTERS:

..PICTURE:CH04_01.bmp

..HOTSPOTS:

..TEXT:

This figure shows a presentation outline in Outline view.

Because this block of text starts with a SCREEN tag, not an ITEM tag, the compiler knows to create only a Screen record. This block has all of the same tags as the fully tagged item in the previous section. It lacks those tags that apply only to an item (PARENT, TOCPOSITION, and SKIMTEXT).

A Minimally Tagged Screen

Below is an example of a minimally tagged screen in the input file 70_12.DOC. This particular block of text creates a Screen record titled "How to Prepare."

..SCREEN:2;How to Prepare

Carefully review the Exam Topics section of this preparation guide. It provides a comprehensive list of the skills measured by the exam. The Training and Reference Options section contains information about educational resources that are available. You may want to customize your own preparation plan to complement your current skill level.

Recall that in a minimally tagged input file, much of the information needed to create a Screen table record is specified in a separate outline. The only information that is specified in the block of text is the title of the screen and its order under its parent (specified by the 2 that follows the SCREEN tag). The id is derived from the filename and the screen order. The id for this screen will be 70_12.DOC_2. The compiler assumes that the parent of this screen is a screen with the id 70_12.DOC (the filename without the final underscore). The rest of the information needed to create a Screen table record is supplied by the outline and is copied from the Screen table record that the outline creates.

Automated Text Tagging

Most tagging is done automatically using WordBasic. The appropriate set of tags is pasted in before each paragraph with a predetermined style (usually at each level 1, 2 or 3 heading style and at a number of other special styles).

In the following WordBasic code fragment, a default set of tags is pasted in at a heading 3 style paragraph. Then, the default tag values are replaced with values appropriate to the current item


currsty$ = LCase$(StyleName$(0))
Select Case currsty$
Case "heading 3"

    'Insert default tags
    EditAutoText .Name = "Header Item", .Context = 0, .InsertAs = 0, .Insert

    'Determine and fill in the correct title
    title$ = Get_Title$("")
    If title$ <> "" Then
        Fill_Tag "ITEM", title$, "heading 3"
    End If

    'Determine and fill in the correct id
    id$ = Get_Screen_Id$("")
    Fill_Tag "ID", id$, ""

    'Determine and fill in the correct parent and sortorder
    toc$ = Get_Sort$()
    Fill_Tag "TOCPOSITION", toc$, ""
    parent$ = Get_Parent()
    Fill_Tag "PARENT", Parent$, ""
    
    'Fill other tags with values appropriate for this heading level
    Fill_Tag "ITEMTYPE", "folder", ""
    Fill_Tag "SCREENTYPE", "touch", ""
    Fill_Tag "PICTURE", "bkgtouch.bmp", ""
Case ...

Almost all of the information necessary to fill in the tags can derived from the style names and the position of the tag relative to other tags in the file being processed. The content of the ITEM tag is set to the text in the first paragraph of the item. The ID is generated using a unique id procedure. The PARENT and TOCPOSITION tags are derived from the heading level of the item and its position in the file. The content of the SCREENTYPE, FILTERS, and PICTURE tags is derived from the content of the chunk itself. Only the SKIMTEXT tag is left unprocessed by the tagging routines.

At the end of the automatic tagging process the content is fully marked and can be compiled into the title database. However, the content may still need to be edited and exceptional items may need to be tagged manually.