gramps/gramps2/doc/grampsxml.dtd

328 lines
8.1 KiB
DTD
Raw Normal View History

2005-10-06 05:31:27 +05:30
<!--?xml version="1.0" encoding="UTF-8"?-->
<!--
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2001 Graham J. Williams
# Copyright (C) 2000-2005 Donald N. Allingham
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# $Id$
-->
<!--
This is the Document Type Definition file for v1.0.0
of the GRAMPS XML genealogy data format.
Please use the following formal public identifier to identify it:
"-//GRAMPS//DTD GRAMPS XML V1.0.0//EN"
For example:
<!DOCTYPE database PUBLIC "-//GRAMPS//DTD GRAMPS XML V1.0.0//EN"
"http://gramps-project.org/xml/1.0.0/grampsxml.dtd"
[...]>
-->
<!--
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
-->
<!ELEMENT database (header, people?, families?, sources?, places?, objects?,
bookmarks?)>
<!ATTLIST database xmlns CDATA #FIXED "http://gramps-project.org/">
<!-- ************************************************************
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
>
<!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
-->
<!ELEMENT people (person)*>
<!ATTLIST people
default CDATA #IMPLIED
home IDREF #IMPLIED
>
<!ELEMENT person (gender, name*, nick?, event*, lds_ord*,
objref*, url*, childof*, address*, parentin*,
sourceref?, attribute*, note?)>
<!ATTLIST person
id CDATA #REQUIRED
handle ID #REQUIRED
change CDATA #REQUIRED
commplete (0|1) #IMPLIED
>
<!--
GENDER has values of M, F, or U.
-->
<!ELEMENT gender (#PCDATA)>
<!ELEMENT name (first?,last?,suffix?,patronymic?,title?,
(daterange|dateval|datestr)?,note?,sourceref?)>
<!ATTLIST name
preferred (0|1) #IMPLIED
type CDATA #IMPLIED
priv (0|1) #IMPLIED
sort CDATA #IMPLIED
display CDATA #IMPLIED
>
<!ELEMENT first (#PCDATA)>
<!ELEMENT last (#PCDATA)>
<!ATTLIST last
prefix CDATA #IMPLIED
group CDATA #IMPLIED
>
<!ELEMENT suffix (#PCDATA)>
<!ELEMENT patronymic (#PCDATA)>
<!ELEMENT title (#PCDATA)>
<!ELEMENT nick (#PCDATA)>
<!ELEMENT childof EMPTY>
<!ATTLIST childof
hlink IDREF #REQUIRED
mrel (None|Birth|Adopted|Stepchild|Sponsored|Foster|Other|Unknown) #IMPLIED
frel (None|Birth|Adopted|Stepchild|Sponsored|Foster|Other|Unknown) #IMPLIED
>
<!ELEMENT parentin EMPTY>
<!ATTLIST parentin hlink IDREF #REQUIRED>
<!ELEMENT address ((daterange|dateval|datestr)?,street?,city?,state?,
country?,postal?,phone?,note?,sourceref?)>
<!ATTLIST address priv (0|1) #IMPLIED>
<!ELEMENT street (#PCDATA)>
<!ELEMENT city (#PCDATA)>
<!ELEMENT country (#PCDATA)>
<!ELEMENT postal (#PCDATA)>
<!ELEMENT state (#PCDATA)>
<!ELEMENT phone (#PCDATA)>
<!-- ************************************************************
FAMILY
An element to record information about a family.
-->
<!ELEMENT families (family)*>
<!ELEMENT family (father?,mother?,event*,lds_ord*,
objref*,child*,attribute*,note?)>
<!ATTLIST family
id CDATA #REQUIRED
handle ID #REQUIRED
change CDATA #REQUIRED
complete (0|1) #IMPLIED
type CDATA #IMPLIED
>
<!ELEMENT father EMPTY>
<!ATTLIST father hlink IDREF #REQUIRED>
<!ELEMENT mother EMPTY>
<!ATTLIST mother hlink IDREF #REQUIRED>
<!ELEMENT child EMPTY>
<!ATTLIST child hlink IDREF #REQUIRED>
<!-- ************************************************************
SOURCES
-->
<!ELEMENT sources (source)*>
<!ELEMENT source (stitle?,sauthor?,spubinfo?,sabbrev?,
note?,objref*,data_item*)>
<!ATTLIST source
id CDATA #REQUIRED
handle ID #REQUIRED
change CDATA #REQUIRED
>
<!ELEMENT stitle (#PCDATA)>
<!ELEMENT sauthor (#PCDATA)>
<!ELEMENT spubinfo (#PCDATA)>
<!ELEMENT sabbrev (#PCDATA)>
<!-- ************************************************************
PLACES
-->
<!ELEMENT places (placeobj)*>
<!ELEMENT placeobj (coord?,location*,objref*,url*,note?,sourceref*)>
<!ATTLIST placeobj
id CDATA #REQUIRED
handle ID #REQUIRED
change CDATA #REQUIRED
title CDATA #REQUIRED
>
<!ELEMENT coord EMPTY>
<!ATTLIST coord
long CDATA #REQUIRED
lat CDATA #REQUIRED
>
<!ELEMENT location EMPTY>
<!ATTLIST location
city CDATA #IMPLIED
parish CDATA #IMPLIED
county CDATA #IMPLIED
state CDATA #IMPLIED
country CDATA #IMPLIED
postal CDATA #IMPLIED
phone CDATA #IMPLIED
>
<!-- ************************************************************
OBJECTS
-->
<!ELEMENT objects (object)*>
<!ELEMENT object (attribute*,note?,(daterange|dateval|datestr)?,sourceref*)>
<!ATTLIST object
id CDATA #REQUIRED
handle ID #REQUIRED
change CDATA #REQUIRED
src CDATA #REQUIRED
mime CDATA #REQUIRED
description CDATA #REQUIRED
>
<!-- ************************************************************
BOOKMARKS
-->
<!ELEMENT bookmarks (bookmark)*>
<!ELEMENT bookmark EMPTY>
<!ATTLIST bookmark hlink IDREF #REQUIRED>
<!-- ************************************************************
SHARED ELEMENTS
-->
<!ELEMENT daterange EMPTY>
<!ATTLIST daterange
start CDATA #REQUIRED
stop CDATA #REQUIRED
cformat CDATA #IMPLIED
>
<!ELEMENT dateval EMPTY>
<!ATTLIST dateval
val CDATA #REQUIRED
type (before|after|about) #IMPLIED
cformat CDATA #IMPLIED
>
<!ELEMENT datestr EMPTY>
<!ATTLIST datestr val CDATA #REQUIRED>
<!ELEMENT note (#PCDATA)>
<!ATTLIST note format (0|1) #IMPLIED>
<!ELEMENT sourceref (spage?,scomments?,stext?,(daterange|dateval|datestr)?)>
<!ATTLIST sourceref
hlink IDREF #REQUIRED
conf CDATA #IMPLIED
>
<!ELEMENT spage (#PCDATA)>
<!ELEMENT scomments (#PCDATA)>
<!ELEMENT sdate (#PCDATA)>
<!ELEMENT stext (#PCDATA)>
<!ELEMENT attribute (sourceref*,note?)>
<!ATTLIST attribute
priv CDATA #IMPLIED
type CDATA #REQUIRED
value CDATA #REQUIRED
>
<!--
EVENT
-->
<!ELEMENT event ((daterange|dateval|datestr)?,witness*,place?,cause?,
description?,note?,sourceref*,objref*)>
<!ATTLIST event
type CDATA #REQUIRED
priv (0|1) #IMPLIED
>
<!ELEMENT witness (comment?)>
<!ATTLIST witness
hlink IDREF #IMPLIED
name CDATA #IMPLIED
>
<!ELEMENT comment (#PCDATA)>
<!ELEMENT place EMPTY>
<!ATTLIST place hlink IDREF #REQUIRED>
<!ELEMENT cause (#PCDATA)>
<!ELEMENT description (#PCDATA)>
<!ELEMENT url EMPTY>
<!ATTLIST url
priv (0|1) #IMPLIED
href CDATA #REQUIRED
description CDATA #IMPLIED
>
<!ELEMENT objref (attribute)*>
<!ATTLIST objref hlink IDREF #REQUIRED>