Building the Header

When you open an object for editing, the data is exported and stored in a file or files on your system.

The editor extracts the data in the object’s Document Type property sheet field and:

  • looks in the Contenta Tool Preferences under Global, for a Document Types key on the Global desktop.

    If the Document Types key is found:

  • the editor checks for a match of the data in the object’s Document Type property sheet field to a key under the Document Types key.

    When a match is found:

  • looks for the DATATYPE value

    if DATATYPE is xml, (whether defined or assumed as the default) the editor looks for the XMLDECL value and uses it to write the xml version header. If the value is not found, the default is used.

    if DATATYPE is not xml, XMLDECL is ignored.

  • writes the DOCTYPE header by inserting the data found in the Document Type field as the DOCTYPE.
    For example, assume the Document Type property sheet field contains the value PLAY, the editor writes:
    <!DOCTYPE PLAY
  • looks for the value for PUBID and completes the header.
    For example, assume that the PUBID value for the document type is:
    -//ArborText//DTD Shakespeare 930801//EN
    the editor finishes writing the header:
    <!DOCTYPE PLAY PUBLIC “-//ArborText//DTD Shakespeare 930801//EN”
  • After the header is inserted, the data is exported to a file.

    The DATATYPE value is applied as the file extension.

    If the value is not found the default value, xml, is applied.

  • When the file is open, the editor checks the catalog file for the location of the DTD. See Locating the DTD (the Catalog File).