# An XML Application for Genealogy

This Version: August 24, 2003

Latest Version: http://ns.cafeconleche.org/genealogy/

Previous Version: May 25, 2001

Authors:

- Elliotte Rusty Harold

This document describes the an XML application for genealogy statistics used as an example in the 3rd edition of the XML Bible.

Available related resource include:

- A DTD
- A Modularized DTD
- A schema
- An XSLT stylesheet

Chapter 25 of the XML Bible, 3rd Edition, describes and explains this XML application in much greater detail. You should be able to find it in any bookstore that stocks computer books including Bookpool and Powells. The list price is $39.99, but it's often discounted. If you need to special order it, the ISBN number is 0-7645-4986-3 and the author is Elliotte Rusty Harold

This document has no official standing and has not been considered or approved by any organization.

## Document Type Definition

The family tree DTD describes an XML application for basic genealogical data. It's designed to validate documents with the root element `FAMILY_TREE` in the http://ns.cafeconleche.org/genealogy/ namespace. It depends on two DTD modules:

- The source DTD describes `SOURCE` elements in the http://ns.cafeconleche.org/genealogy/ namespace.
- The family DTD describes `FAMILY` elements in the http://ns.cafeconleche.org/genealogy/ namespace. This in turn depends on the person DTD. This DTD describes a single `PERSON` element in the http://ns.cafeconleche.org/genealogy/ namespace.

## A Modularized DTD

The modularized family tree DTD describes the same XML application for basic genealogical data as the previous DTD. However, it's designed to allow document authors to modify the namespace prefix by overriding the `%GENEALOGY.prefix;` and `%GENEALOGY.prefixed;` parameter entity references. If you wish to turn on prefixing, set `%GENEALOGY.prefixed;` to `INCLUDE` and `%GENEALOGY.prefix;` to the prefix you want to use.

It is composed of six modules and one driver DTD:

- The source module describes `SOURCE` elements in the http://ns.cafeconleche.org/genealogy/ namespace.
- The family module describes `FAMILY` elements in the http://ns.cafeconleche.org/genealogy/ namespace.
- The person module describes `PERSON` elements in the http://ns.cafeconleche.org/genealogy/ namespace.
- The family tree module describes `FAMILY_TREE` elements in the http://ns.cafeconleche.org/genealogy/ namespace.
- The namespaces module defines the namespace URI and prefix used in this application.
- The qualified names module defines parameter entity references that resolve to the prefixed names of the different elements in this application.
- The driver DTD loads all the modules in the correct order.

## Schema

The family tree W3C XML Schema Language schema describes an XML application for basic genealogical data. It's designed to validate documents with the root element `FAMILY_TREE` in the http://ns.cafeconleche.org/genealogy/ namespace. It depends on two DTD modules:

- The source W3C XML Schema Language schema describes `SOURCE` elements in the http://ns.cafeconleche.org/genealogy/ namespace.
- The family W3C XML Schema Language schema describes `FAMILY` elements in the http://ns.cafeconleche.org/genealogy/ namespace. This in turn depends on the person schema. This schema describes a single `PERSON` element in the http://ns.cafeconleche.org/genealogy/ namespace.

## XSLT Style Sheet

An XSLT 1.0 style sheet for genealogy data is available. This does not work with Internet Explorer 5.5 and earlier because of Microsoft's nonconforming implementation of XSLT.