Data File Format

From Scripture Topical Guide

Jump to: navigation, search

The topical guide data is stored in an XML-based format. There are currently two types of files, the index file and topics files.

Contents

Index File

The index file has only two types of tags. There is the root element, index, and the topics elements.

The index element is just a plain element with no attributes which can have topics elements as child elements.

The topics elements have no children and have the attribute file which contains a file name referring to a topics file residing in the same folder as the index file. A simple index file might look like this:

<index>
<topics file="01.xml"/>
<topics file="a.xml"/>
<topics file="b.xml"/>
</index>

The Scripture Topical Guide currently infers the organization of the topical guide from the file names. ("a.xml" contains the data for the "A" category, "01.xml" contains the data for the numeric category, etc.)

Topics File

A topics file's root element is the tg element, which has not attributes and has subject elements as children.

A subject element has a title attribute specifying the subject's name. A subject element can also have one citations element, one notes element, and one crossrefs element as children. It does not need to have any.

Citations Element

A citations element has no attributes and can have citation elements as children.

A citation element should have a text attribute and/or a ref attribute. The text attribute specifies a plain text citation, whereas a ref specifies a programmatically interpretable reference. The citation element generally contains text giving some short explanation of the citation, but no other child nodes.

A citation element can have a private attribute specified as well indicating whether or not the citation is private. This attribute can have a value of "true" or "false". If this attribute is not specified, the value is considered to be "false" by default. (The attribute is generally not specified unless its value is to be "true".)

Notes Element

A notes element has no attributes and can have note elements as children.

A note element has a heading attribute specifying the title of the note and generally contains text defining the content of the note, but no other child nodes.

A note element can have a private attribute specified as well indicating whether or not the note is private. This attribute can have a value of "true" or "false". If this attribute is not specified, the value is considered to be "false" by default. (The attribute is generally not specified unless its value is to be "true".)

Crossrefs Element

A crossrefs element has no attributes and can have crossref elements as children.

A crossref element has a subject attribute matching the title attribute of some subject element which is not the parent subject. A crossref element has no children and no text.

Personal tools