CIS97 YT > Relax NG Projects > Family Tree Markup Language Documentation

Relax NG Projects
Family Tree Documentation

Project Index | Documentation | Relax NG | Sample XML File

A <family_tree> consists of a <people> element followed by a <families> element.

A <people> element contains one or more <person> elements.

Each <person> element has a unique id and a gender attribute. The gender attribute has values m (for male) or f (for female).

Each <person> element contains a required <name> and optional<birth>, <death> <father>,<mother>, and <spouse> elements. (These last four are individually optional, not as a whole group. They are optional because the information may not be known or because the person is still alive.)

Each <name> element contains a <given> and <surname> element. Both <given> and <surname> are required elements and contain text.

Each <birth> element contains a <date> and <place> element in any order.

Each <date> is of data type string which must begin with four digits (for the year) followed by a hyphen followed by two digits (for month) followed by a hyphen and two digits(for day).

Each <place> element must begin with a letter followed by one or more letters.

Each <death> element contains <date> and <place> elements in any order.

The <date> and <place> elements have the same format as described in the <birth> element.

A <father>, <mother>, and <spouse> elements are empty elements. Each has an unique idref attribute, which must begin with the letter “p” followed by one or more digits.

Once the people have been specified, you specify the families that are made up of those people:

A <families> element contains one or more<family>element. Each <family> element has a unique id attribute, which must begin with the letter “f” followed by one or more digits.

A <family> contains in any order, a <husband>, a <wife>, and zero or more <child> elements, a <marriage> and a <description> elements. (All of these are optional.)

The <husband>, <wife>, and <child> elements are empty elements which have a unique idref attribute. The idref attribute must begin with the letter “p” followed by one or more digits.

Each <marriage> element has in any order <date> or <place> or both elements.

Each <date> element is of data type string which must begin with four digits (for the year) followed by a hyphen followed by two digits (for the month) followed by a hyphen and two digits (for the day).

The <place> and <description> elements contain text.