41.3 Preparing a content model for use with DITA2Go

If you plan to use a built-in content model as is, you do not need to do anything described in this section.

To prepare a new, modified, or replacement content-model configuration for use with DITA2Go:

  1. Inspect and (if necessary) change element type assignments; see §41.6 Inspecting and correcting element types.
  2. For DITA only, if you are adding or replacing a content model, provide information needed by DITA2Go that is not available in the DTD:

    If you generated the content model from a DTD and you plan to rerun dtd2ini, also include in configuration file dtd2ini.ini as overrides any [Topic] and [*Table] settings you add. See dtd2ini.txt for instructions.

  3. Include the following setting in the content-model configuration file:
    [Topic]
    ; ModelName = name of type (usually a built-in) to be replaced
    ;  after this file loads, effective only when this file is
    ;  specified in [DITAContentModels] or
    ;  [DocBookOptions]ContentModel in the project configuration file;
    ;  overrides the default use of the filename (without "DITA").
    ModelName = contentmodelname
    

    ModelName specifies either the name of an existing content model to be replaced by the current content model, or a name for the new content model to be added.

    If you are replacing a built-in content model, the value for ModelName must be one of the following, depending on the output type: 

    Output type

    Built-in content model to be replaced by current model

    DITA 1.0

    topic, concept, task, reference, or map

    DITA 1.1

    topic, concept, task, reference, map, glossary, or bookmap

    DocBook

    book or article

    If you assign any other value to ModelName, DITA2Go adds the new name to the list of models. For example, to add a new DITA topic type widget defined in content-model configuration file DITAwidget.ini, in DITAwidget.ini you would include the following setting:

    [Topic]
    ModelName = widget
    

    To replace the built-in DITA reference content model with a model you have defined in content-model configuration file DITAmyref.ini, in DITAmyref.ini you would include the following setting:

    [Topic]
    ModelName = reference
    
  4. Place the new or modified content-model configuration file in your DITA or DocBook project directory.
  5. Specify the base name of the content-model configuration file in your project configuration file:

    For DITA, add the base name of each new or modified content-model configuration:

    [DITAContentModels]
    ; Topic type name = any text (not used)
    DITAtopictype = replaced or new topictype content model
    

    For DocBook, specify the base name of the new or modified content-model configuration:

    [DocBookOptions]
    ; ContentModel = name of content-model .ini, without extension,
    ;  with which to replace the built-in DocBook 4.5 content model.
    ContentModel = otherdocbookmodel
    

Previous Topic:  41.2.2 Generating a content model from a DTD

Next Topic:  41.4 Understanding content-model configurations

Parent Topic:  41. Working with content models

Sibling Topics:

41.1 Understanding DITA2Go content models

41.2 Modifying or replacing a content model

41.4 Understanding content-model configurations

41.5 Understanding how DITA2Go uses content models

41.6 Inspecting and correcting element types

41.7 Specializing or modifying DITA topic types

41.8 Extracting content-model debug information