oaktree
Family Tree Markup Language (FTML)
FTML is an XML grammar for defining Family Trees. It consists of a set of HTML-like tags and attributes which define people, marriages etc. Like all XML grammars, it is a simple, but powerful description language. FTML is a much more modern data format than Gedcom and in FamilyTree utilises the Xerces XML parser to read it.

Header
The header for an FTML document always reads:

<?xml version="1.0" ?>
<!DOCTYPE ftml SYSTEM "ftml.dtd">

The header is always followed by an <ftml> tag.


<ftml> tag
The <ftml> tag encompasses the entire document and is simply:

<ftml>
  people
  [ marriages ]
</ftml>

Inside the <ftml> tag goes the <people> tag and optionally the <marriages> tag.


<people> tag
The <people> tag groups a collection of people and is simply:

<people>
  person +
</people>

Inside the <people> tag goes one or more <person> tags.


<marriages> tag
The <marriages> tag groups a collection of marriages and is simply:

<marriages>
  marriage +
</marriages>

Inside the <marriages> tag goes one or more <marriage> tags.


<person> tag
The <person> tag represents an individual person and is either:

<person attributes />

or

<person attributes>
  [ born ]
  [ christened ]
  [ died ]
  [ mother ]
  [ father ]
  [ page ]
  [ census ]
</person>

The attributes of the <person> tag are:

id="id"
sex="male|female"
[ root="true|false" ]
surname="surname"
forenames="forenames"

Where id is a unique identifier for this person. root is used in the browser to add this person as a "normal" root of the tree - if no roots are given, a list will be built automatically.
Inside the <person> tag goes any of the <born>, <christened>, <died>, <mother>, <father>, <page> and <census> tags.


<born>, <christened> and <died> tags
These tags represent the significant points in a person's life. They all have the same format:

<born date="date" [place="place"] [href="page"] />
<christened date="date" [place="place"] [href="page"] />
<died date="date" [place="place"] [href="page"] />

The href attribute is new in version 1.1 of FamilyTree. It allows pages to be specified that appear on the pull-right menu of the tree-view. It is useful for referencing documents like Birth Certificates.


<mother> and <father> tags
These tags represent the parents of a person. They both have the same format:

<mother id="id" />
<father id="id" />

Where id is the unique identifier of another person.


<page> tag
The <page> tag represents the HTML page associated with this person. It is simply:

<page href="page" />

Where page is the name of the HTML page to associate.


<census> tag
The <census> tag represents the inclusion of the person in a particular census. It is has the following format:

<census year="year" [place="place"] [condition="condition"]
  [age="age"] [placeofbirth="birthplace"] />


<marriage> tag
The <marriage> tag represents the marriage between two people. It is has the following format:

<marriage husband="id" wife="id" [date="date"] [place="place"] [href="page"] />

Where the id's are the unique identifiers of two people.
The href attribute is new in version 1.1 of FamilyTree. It allows a page to be specified that will appear on the pull-right menu of the tree-view. It is useful for referencing documents Marriage Certificates.