gramps/doc/gramps.dtd

321 lines
7.2 KiB
DTD
Raw Normal View History

2001-08-09 20:03:57 +05:30
<!--?xml version="1.0" encoding="UTF-8"?-->
<!-- A Document Type Definition for genealogy data (as produced by Gramps)
Copyright (c) 2001 Graham J. Williams
2002-01-23 05:56:30 +05:30
Time-stamp: <2002/01/22 15:41:37 Graham.Williams@csiro.au>
2001-08-09 20:03:57 +05:30
Freely Redistributable under the terms of the GNU General Public License.
2002-01-23 05:56:30 +05:30
Based on GEDCOM and conforming to the Gramps XML encoding.
Still under development and Gramps XML not complete.
2001-08-09 20:03:57 +05:30
Information on Gramps is available from http://
-->
<!--
2002-01-23 05:56:30 +05:30
DATABASE
Defines an XML document which is a <database> consisting of a
header Information about the "owner" of the database
people
families
sources
places
objects
bookmarks
2001-08-09 20:03:57 +05:30
-->
2002-01-23 05:56:30 +05:30
<!ELEMENT database (header, people?, families?, sources?, places?, objects?,
bookmarks?)>
2001-08-09 20:03:57 +05:30
<!-- ************************************************************
HEADER
A <header> consists of <created> (information about this
genealogical database) and <researcher> (information about the
person who created this genealogical database)
-->
<!ELEMENT header (created, researcher?)>
<!ELEMENT created EMPTY>
<!ATTLIST created
date CDATA #REQUIRED
version CDATA #REQUIRED
people CDATA #REQUIRED
families CDATA #REQUIRED>
<!ELEMENT researcher (resname, resaddr?, rescity?, resstate?,
rescountry?, respostal?, resphone?, resemail?)>
<!ELEMENT resname (#PCDATA)>
<!ELEMENT resaddr (#PCDATA)>
<!ELEMENT rescity (#PCDATA)>
<!ELEMENT resstate (#PCDATA)>
<!ELEMENT rescountry (#PCDATA)>
<!ELEMENT respostal (#PCDATA)>
<!ELEMENT resphone (#PCDATA)>
<!ELEMENT resemail (#PCDATA)>
<!-- ************************************************************
PEOPLE
The UID is a place holder for PAF UID's that are imported. PAF
generates a unique ID for each person which is useful for
merges. It is not used by Gramps otherwise.
-->
<!ELEMENT people (person)*>
<!ATTLIST people default CDATA #IMPLIED>
2002-01-23 05:56:30 +05:30
<!--
PERSON
gender Either M or F.
name
aka Also known as. Alternative names from marriage,
adoption, legal name change, etc
nick The nick name - a name the person is sometimes known by.
-->
2001-08-09 20:03:57 +05:30
<!ELEMENT person (gender, name?, aka*, nick?, pos?, uid?, event*,
2002-01-23 05:56:30 +05:30
objref*, url*, childof*, address*, parentin*,
2001-08-09 20:03:57 +05:30
sourceref?, attribute*, note?)>
<!ATTLIST person id ID #REQUIRED>
2002-01-23 05:56:30 +05:30
<!--
GENDER has values of M or F.
-->
<!ELEMENT gender (#PCDATA)>
<!--
NAME and AKA
first Given names
last Surname
suffix
title E.g., Sargent Major
-->
<!ELEMENT name (first?, last?,suffix?,title?)>
2001-08-09 20:03:57 +05:30
<!ATTLIST name conf CDATA #IMPLIED
priv CDATA #IMPLIED>
<!ELEMENT aka (first?, last?,suffix?,note?)>
2001-08-09 20:03:57 +05:30
<!ATTLIST aka conf CDATA #IMPLIED
priv CDATA #IMPLIED>
<!ELEMENT first (#PCDATA)>
<!ELEMENT last (#PCDATA)>
<!ELEMENT suffix (#PCDATA)>
2002-01-23 05:56:30 +05:30
<!ELEMENT title (#PCDATA)>
2001-08-09 20:03:57 +05:30
<!ELEMENT nick (#PCDATA)>
<!ELEMENT uid (#PCDATA)>
<!ELEMENT pos EMPTY>
<!ATTLIST pos x CDATA #REQUIRED
y CDATA #REQUIRED>
<!ELEMENT childof EMPTY>
<!ATTLIST childof
ref IDREF #REQUIRED
mrel (Birth|Adopted|Stepchild|Other|Unknown) #IMPLIED
frel (Birth|Adopted|Stepchild|Other|Unknown) #IMPLIED>
<!ELEMENT parentin EMPTY>
<!ATTLIST parentin
ref IDREF #REQUIRED>
2002-01-23 05:56:30 +05:30
<!ELEMENT address (dateval?,street?,city?,state?,country?,postal?,
2001-08-09 20:03:57 +05:30
note?,sourceref?)>
<!ATTLIST address conf CDATA #IMPLIED
priv CDATA #IMPLIED>
<!ELEMENT street (#PCDATA)>
<!ELEMENT city (#PCDATA)>
<!ELEMENT country (#PCDATA)>
<!ELEMENT postal (#PCDATA)>
<!ELEMENT state (#PCDATA)>
<!-- ************************************************************
FAMILY
An element to record information about a family.
-->
<!ELEMENT families (family)*>
2002-01-23 05:56:30 +05:30
<!ELEMENT family (father?,mother?,event*,objref*,child*,attribute*,note?)>
2001-08-09 20:03:57 +05:30
<!ATTLIST family
id ID #REQUIRED
type (Married|Unmarried|Partners|Other|Unkown) #IMPLIED>
<!ELEMENT father EMPTY>
<!ATTLIST father ref IDREF #REQUIRED>
<!ELEMENT mother EMPTY>
<!ATTLIST mother ref IDREF #REQUIRED>
<!ELEMENT child EMPTY>
<!ATTLIST child ref IDREF #REQUIRED>
<!-- ************************************************************
SOURCES
-->
<!ELEMENT sources (source)*>
<!ELEMENT source (sauthor?,spubinfo?,scallno?)>
<!ATTLIST source id ID #REQUIRED>
<!ELEMENT sauthor (#PCDATA)>
<!ELEMENT spubinfo (#PCDATA)>
<!ELEMENT scallno (#PCDATA)>
<!-- ************************************************************
PLACES
-->
<!ELEMENT places (placeobj)*>
2002-01-23 05:56:30 +05:30
<!ELEMENT placeobj (coord?,location*,objref*,url*,note?)>
<!ATTLIST placeobj id ID #REQUIRED title CDATA #IMPLIED>
<!ELEMENT coord EMPTY>
<!ATTLIST coord long CDATA #REQUIRED lat CDATA #REQUIRED>
<!ELEMENT location EMPTY>
<!ATTLIST location
2002-01-23 05:56:30 +05:30
city CDATA #IMPLIED
county CDATA #IMPLIED
state CDATA #IMPLIED
country CDATA #IMPLIED
parish CDATA #IMPLIED
>
2002-01-23 05:56:30 +05:30
<!ELEMENT objects (object)*>
<!ELEMENT object (attribute)*>
<!ATTLIST object
id ID #REQUIRED
src CDATA #IMPLIED
mime CDATA #IMPLIED
description CDATA #IMPLIED>
2001-08-09 20:03:57 +05:30
<!-- ************************************************************
BOOKMARKS
-->
<!ELEMENT bookmarks (bookmark)*>
<!ELEMENT bookmark EMPTY>
<!ATTLIST bookmark ref IDREF #REQUIRED>
<!-- ************************************************************
SHARED ELEMENTS
-->
2002-01-23 05:56:30 +05:30
<!ELEMENT attribute (note?,sourceref?)>
<!ATTLIST attribute conf CDATA #IMPLIED
priv CDATA #IMPLIED
type CDATA #IMPLIED
value CDATA #IMPLIED
>
2001-08-09 20:03:57 +05:30
2002-01-23 05:56:30 +05:30
<!--ELEMENT attr_type (#PCDATA)>
<!ELEMENT attr_value (#PCDATA)-->
2001-08-09 20:03:57 +05:30
<!--
2002-01-23 05:56:30 +05:30
EVENT
We can enumerate all possibilities for an event and then this will
not conform to Gramps as Gramps allows any type of events (i.e., a
user can define their own type of event) . By allowing anything
(CDATA) we no longer have automatic checking and in emacs no more
automatic selection of event types.
2001-08-09 20:03:57 +05:30
So decide to use the enumerated list for now unless there is a storm
of protest.
2001-08-09 20:03:57 +05:30
2002-01-23 05:56:30 +05:30
Alternative Birth Another possible birth date
Degree Awarding of a degree
Education Some step in the education process
Graduation Graduation (often same as degree)
2001-08-09 20:03:57 +05:30
-->
2002-01-23 05:56:30 +05:30
<!ELEMENT event (dateval?,place?,description?,sourceref?,note?)>
<!ATTLIST event type
(Annulment|Birth|Death|Christening|Baptism|Engagement|Marriage|
Occupation|Education|Degree|Immi|Burial|Cremation)
#REQUIRED>
<!ELEMENT dateval EMPTY>
<!ATTLIST dateval
val CDATA #REQUIRED
type CDATA #IMPLIED>
<!--ELEMENT date (#PCDATA) replaced by dateval-->
2001-08-09 20:03:57 +05:30
<!ELEMENT description (#PCDATA)>
<!ELEMENT note (#PCDATA)>
<!ELEMENT url EMPTY>
<!ATTLIST url href CDATA #REQUIRED
conf CDATA #IMPLIED
priv (0|1) #IMPLIED
description CDATA #IMPLIED>
<!ELEMENT place EMPTY>
<!ATTLIST place ref IDREF #REQUIRED>
2001-08-09 20:03:57 +05:30
<!ELEMENT sourceref (spage?,scomments?,stext?,sdate?)>
<!ATTLIST sourceref ref IDREF #REQUIRED>
<!ELEMENT spage (#PCDATA)>
<!ELEMENT scomments (#PCDATA)>
<!ELEMENT sdate (#PCDATA)>
<!ELEMENT stext (#PCDATA)>
2002-01-23 05:56:30 +05:30
<!ELEMENT objref (attribute)*>
<!ATTLIST objref
ref IDREF #REQUIRED
>
2001-08-09 20:03:57 +05:30
<!ELEMENT img EMPTY>
<!ATTLIST img
src CDATA #REQUIRED
description CDATA #IMPLIED
2001-08-09 20:03:57 +05:30
display CDATA #IMPLIED>