Previous  Contents 

Appendix C - XML File Format

This document introduces the XML format supported by Chartist-Pro. The file extension used for this format is .nvg-cht-xml. This document assumes the reader is familiar with the XML specification. That specification is available fromW3C.

Chartist uses the XML format in order to provide a fully specified file format for processing by external applications. All document information is saved and restored in this format, unlike the earlier proprietary Text File format described in Appendix B of the Chartist User's Guide.

The DOCTYPE Tag

The DTD is nvg.dtd. The following identifiers may be used in externally constructing Chartist XML files:


PUBLIC "-//Novagraph//Chartist 1.0//EN"

SYSTEM "http://www.novagraph.com/xml/dtds/10/nvg.dtd"

If a DOCTYPE tag is included in the file, Chartist will validate the input against that DOCTYPE.

Public DOCTYPE Usage

The following tag will cause Chartist to validate the input against the standard DTD located at the Novagraph Web Site:


<!DOCTYPE NvgChartistDoc PUBLIC "-//Novagraph//Chartist 1.0//EN" "http://www.novagraph.com/xml/dtds/10/nvg.dtd">

Private DOCTYPE Usage

For convenience, a copy of nvg.dtd may be downloaded and used locally. For example, if the nvg.dtd file is located in the same directory as the Chartist files, the following DOCTYPE could be used:


<!DOCTYPE NvgChartistDoc SYSTEM "nvg.dtd">

How Chartist Uses DOCTYPE

Chartist does not use a DOCTYPE tag in files it creates, since it is not necessary to validate the file again when it is input. However, externally generated files should include a DOCTYPE tag to assist in debugging. Chartist will provide diagnostic messages if an input file fails validation.

Reference Information

For a formal definition of the Chartist document type, refer to the nvg.dtd file, referenced above. This file is annotated with information about each of the elements.

The file nvg.dtd is located at the above mentioned URL, and is in the program file directory of the Chartist software distribution.


Previous  Contents