Project Index | Documentation | Relax NG | Sample XML File
The <world-factbook> element contains a <country-list> element.
The <country-list> element contains one or more <country> elements.
The <country> element contains a <name> element followed by a <profile> element.
The <name> element contains plain text.
The <profile> element contains the following elements in order: an <introduction>, a <geography>, a <people>, a <government>, and an <economy>. It must have a name attribute and a unique code attribute.
The <introduction> element contains a <background> element.
The <background> element may contain text with inline elements and <p> (paragraphs) element (see further description).
The <geography> element contains a <location> followed by, in any order, a <coordinates>, an <area>, a <climate> and an optional <note>.
The <location> contains
        plain text.
The <coordinates> is an empty
        element, which has two required attributes
        latitude and longitude that specify
        the coordinates as 0 00 to 359 99 followed by either N, S, E,
        or W
The <area> contains three elements:
        <total>, <land> and
        <water>. Each must be in the form of
        999,999,999 followed by either sq km or sq
        mile.
The <climate> may contain text with inline elements (see further description).
The optional <note> may contain text with inline elements and <p> (see further description).
The <people> element contains these
    elements: <population>,
    <age-structure>,
    <sex-ratio>, <nationality>,
    <ethnic>, <religions>, and
    <language>
The <population> must be in
            the form of 999,999,999.
The <age-structure> element
            contains three required elements:
            <y0-14>, <y15-64>,
            and <y65plus>. Each must be in the form
            of a decimal number under 100. And each has a
            units attribute with a value of %
            sign.
The <sex-ratio> is an empty
            element with a total attribute, which must
            be in the form of a decimal number. It also has a
            stat attribute with a value of
            male(s)/female.
The <nationality> element
            contains plain text.
The <ethnic> element may
            contain text with list elements (see further
            description).
The <religions> element may
            contain text with list elements (see further
            description).
The <language> element may
            contain text with list elements (see further
            description).
The <government> element contains
        a <name>, a <type>,
        a <capital>, an 
        <independence>, and a <suffrage> element.
The <name> has two required elements.
        the <conventional-long> name for the country,
        and the <conventional-short> name for the
        country. Both of these elements contain text.
The <type> describes the type
        of government, and contains plain
        text.
The <capital> contains the name of
        the country's capital as plain text.
The <independence> contains a     
        <date> element, which may contain three
        elements: month, day, and year all in plain text.
The <suffrage> element describes
        the country's voting rights, and consists of plain 
        text.
The <economy> element contains an
    <overview> followed by, in any order, a
    <gdp>, a <labor-force>, an
    <export>, an <import>, a
    <currency>, and an
    <exchange-rates>
The <overview> element may contain
        text with inline elements and <p>
        elements (see further description).
The <gdp> element is an empty
		element which has a required
        amount attribute which must be in the form of a $
        sign followed by a number (either integer or decimal) as
        $999,999.99. It also has a required units
        attribute, which has a value of either million or
        billion.
The <labor-force> gives the number
        of people in the labor force and must be a number in the
        form of either 999,999,999 or 999.9, followed by the word
        million or billion.
The <export> and
        <import> elements are empty elements
		which have a required
        amount attribute which must be in the form of a $
        sign followed by a number (either integer or decimal) as
        $999,999.99. It also has a required units
        attribute, which have a value of either million or
        billion.
The <currency> element contains
        plain text.
The <exchange-rate> element must 
        be in the form of a decimal number. It also has a required
        base attribute with a value of 
        per US dollar.
The inline elements are the <em> and
<strong> elements, which may contain text and other
inline elements.
The <p> (paragraph) element may contain text with inline elements.
The list elements are the <ul> and <li> elements.
The <ul> element may contain <li> elements, and each <li> element may contain text with inline elements.