* doc/grampsxml.dtd: Describe new XML.

* doc/grampsxml.rng: Describe new XML.


svn: r5627
This commit is contained in:
Alex Roitman 2005-12-23 21:32:55 +00:00
parent 30b54a33e9
commit 4f96128b79
3 changed files with 147 additions and 76 deletions

View File

@ -8,6 +8,9 @@
* src/EditSource.py: Use id(self) instead of self.
* src/EventEdit.py: Use id(self) instead of self.
* doc/grampsxml.dtd: Describe new XML.
* doc/grampsxml.rng: Describe new XML.
2005-12-22 Don Allingham <don@gramps-project.org>
* src/AddrEdit.py: More window management
* src/AttrEdit.py: More window management

View File

@ -24,15 +24,15 @@
-->
<!--
This is the Document Type Definition file for v1.0.0
This is the Document Type Definition file for v1.1.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"
"-//GRAMPS//DTD GRAMPS XML V1.1.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"
<!DOCTYPE database PUBLIC "-//GRAMPS//DTD GRAMPS XML V1.1.0//EN"
"http://gramps-project.org/xml/1.1.0/grampsxml.dtd"
[...]>
-->
@ -52,7 +52,7 @@ DATABASE
<!ELEMENT database (header, people?, families?, sources?, places?, objects?,
bookmarks?)>
<!ATTLIST database xmlns CDATA #FIXED "http://gramps-project.org/xml/1.0.0/">
<!ATTLIST database xmlns CDATA #FIXED "http://gramps-project.org/xml/1.1.0/">
<!-- ************************************************************
HEADER
@ -91,14 +91,14 @@ PEOPLE
home IDREF #IMPLIED
>
<!ELEMENT person (gender, name*, nick?, event*, lds_ord*,
<!ELEMENT person (gender, name*, nick?, eventref*, lds_ord*,
objref*, address*, attribute*, url*,
childof*, parentin*, note?, sourceref*)>
childof*, parentin*, note?, sourceref*, marker?)>
<!ATTLIST person
id CDATA #REQUIRED
handle ID #REQUIRED
change CDATA #REQUIRED
complete (0|1) #IMPLIED
priv (0|1) #IMPLIED
>
<!--
@ -157,13 +157,13 @@ FAMILY
<!ELEMENT families (family)*>
<!ELEMENT family (father?,mother?,event*,lds_ord*,
objref*,child*,attribute*,note?,sourceref*)>
<!ELEMENT family (father?,mother?,eventref*,lds_ord*,
objref*,child*,attribute*,note?,sourceref*,marker?)>
<!ATTLIST family
id CDATA #REQUIRED
handle ID #REQUIRED
change CDATA #REQUIRED
complete (0|1) #IMPLIED
priv (0|1) #IMPLIED
type CDATA #IMPLIED
>
@ -176,17 +176,32 @@ FAMILY
<!ELEMENT child EMPTY>
<!ATTLIST child hlink IDREF #REQUIRED>
<!-- ************************************************************
EVENT
-->
<!ELEMENT event ((daterange|dateval|datestr)?,place?,cause?,
description?,note?,sourceref*,objref*,marker?)>
<!ATTLIST event
id CDATA #REQUIRED
handle ID #REQUIRED
change CDATA #REQUIRED
priv (0|1) #IMPLIED
type CDATA #IMPLIED
>
<!-- ************************************************************
SOURCES
-->
<!ELEMENT sources (source)*>
<!ELEMENT source (stitle?,sauthor?,spubinfo?,sabbrev?,
note?,objref*,data_item*)>
note?,objref*,data_item*,reporef*,marker?)>
<!ATTLIST source
id CDATA #REQUIRED
handle ID #REQUIRED
change CDATA #REQUIRED
priv (0|1) #IMPLIED
>
<!ELEMENT stitle (#PCDATA)>
<!ELEMENT sauthor (#PCDATA)>
@ -199,11 +214,12 @@ PLACES
<!ELEMENT places (placeobj)*>
<!ELEMENT placeobj (coord?,location*,objref*,url*,note?,sourceref*)>
<!ELEMENT placeobj (coord?,location*,objref*,url*,note?,sourceref*,marker?)>
<!ATTLIST placeobj
id CDATA #REQUIRED
handle ID #REQUIRED
change CDATA #REQUIRED
priv (0|1) #IMPLIED
title CDATA #REQUIRED
>
@ -230,16 +246,32 @@ OBJECTS
<!ELEMENT objects (object)*>
<!ELEMENT object (attribute*,note?,(daterange|dateval|datestr)?,sourceref*)>
<!ELEMENT object (attribute*,note?,(daterange|dateval|datestr)?,
sourceref*,marker?)>
<!ATTLIST object
id CDATA #REQUIRED
handle ID #REQUIRED
change CDATA #REQUIRED
priv (0|1) #IMPLIED
src CDATA #REQUIRED
mime CDATA #REQUIRED
description CDATA #REQUIRED
>
<!-- ************************************************************
REPOSITORIES
-->
<!ELEMENT repositories (repository)*>
<!ELEMENT repository (name,type,address*,url*,note?,marker?)>
<!ATTLIST repository
id CDATA #REQUIRED
handle ID #REQUIRED
change CDATA #REQUIRED
priv (0|1) #IMPLIED
>
<!-- ************************************************************
BOOKMARKS
@ -280,6 +312,25 @@ SHARED ELEMENTS
conf CDATA #IMPLIED
>
<!ELEMENT eventref (note?)>
<!ATTLIST eventref
hlink IDREF #REQUIRED
priv (0|1) #IMPLIED
role CDATA #IMPLIED
>
<!ELEMENT reporef (note?)>
<!ATTLIST reporef
hlink IDREF #REQUIRED
callno CDATA #IMPLIED
medium CDATA #IMPLIED
>
<!ELEMENT marker EMPTY>
<!ATTLIST marker
type CDATA #REQUIRED
>
<!ELEMENT spage (#PCDATA)>
<!ELEMENT scomments (#PCDATA)>
<!ELEMENT sdate (#PCDATA)>
@ -292,24 +343,6 @@ SHARED ELEMENTS
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>
@ -321,6 +354,7 @@ EVENT
<!ELEMENT url EMPTY>
<!ATTLIST url
priv (0|1) #IMPLIED
type CDATA #IMPLIED
href CDATA #REQUIRED
description CDATA #IMPLIED
>

View File

@ -31,7 +31,7 @@
<grammar
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
ns="http://gramps-project.org/xml/1.0.0/"
ns="http://gramps-project.org/xml/1.1.0/"
xmlns="http://relaxng.org/ns/structure/1.0">
<start><element name="database">
@ -80,6 +80,12 @@
</element></zeroOrMore>
</element></optional>
<optional><element name="repositories">
<zeroOrMore><element name="repository">
<ref name="repository-content"/>
</element></zeroOrMore>
</element></optional>
<optional><element name="bookmarks">
<zeroOrMore><element name="bookmark">
<ref name="bookmark-content"/>
@ -103,14 +109,17 @@
<attribute name="id"><text/></attribute>
<attribute name="handle"><data type="ID"/></attribute>
<attribute name="change"><text/></attribute>
<optional><attribute name="priv"><choice>
<value>0</value>
<value>1</value>
</choice></attribute></optional>
<optional><element name="marker">
<attribute name="value"><text/></attribute>
</element></optional>
</define>
<define name="person-content">
<ref name="primary-object"/>
<optional><attribute name="complete"><choice>
<value>0</value>
<value>1</value>
</choice></attribute></optional>
<element name="gender"><choice>
<value>M</value>
<value>F</value>
@ -120,8 +129,8 @@
<ref name="name-content"/>
</element></zeroOrMore>
<optional><element name="nick"><text/></element></optional>
<zeroOrMore><element name="event">
<ref name="event-content"/>
<zeroOrMore><element name="eventref">
<ref name="eventref-content"/>
</element></zeroOrMore>
<zeroOrMore><element name="lds_ord">
<ref name="lds-content"/>
@ -256,10 +265,6 @@
<define name="family-content">
<ref name="primary-object"/>
<optional><attribute name="complete"><choice>
<value>0</value>
<value>1</value>
</choice></attribute></optional>
<optional><attribute name="type"><choice>
<value>Married</value>
<value>Unmarried</value>
@ -273,8 +278,8 @@
<optional><element name="mother">
<attribute name="hlink"><data type="IDREF"/></attribute>
</element></optional>
<zeroOrMore><element name="event">
<ref name="event-content"/>
<zeroOrMore><element name="eventref">
<ref name="eventref-content"/>
</element></zeroOrMore>
<zeroOrMore><element name="lds_ord">
<ref name="lds-content"/>
@ -297,6 +302,26 @@
</element></zeroOrMore>
</define>
<define name="event-content">
<ref name="primary-object"/>
<attribute name="type"><text/></attribute>
<optional><ref name="date-content"/></optional>
<optional><element name="place">
<attribute name="hlink"><data type="IDREF"/></attribute>
</element></optional>
<optional><element name="cause"><text/></element></optional>
<optional><element name="description"><text/></element></optional>
<optional><element name="note">
<ref name="note-content"/>
</element></optional>
<zeroOrMore><element name="sourceref">
<ref name="sourceref-content"/>
</element></zeroOrMore>
<zeroOrMore><element name="objref">
<ref name="objref-content"/>
</element></zeroOrMore>
</define>
<define name="source-content">
<ref name="primary-object"/>
<optional><element name="stitle"><text/></element></optional>
@ -313,6 +338,9 @@
<attribute name="key"><text/></attribute>
<attribute name="value"><text/></attribute>
</element></zeroOrMore>
<zeroOrMore><element name="reporef">
<ref name="reporef-content"/>
</element></zeroOrMore>
</define>
<define name="place-content">
@ -363,6 +391,21 @@
</element></zeroOrMore>
</define>
<define name="repository-content">
<ref name="primary-object"/>
<optional><element name="name"><text/></element></optional>
<optional><element name="type"><text/></element></optional>
<zeroOrMore><element name="address">
<ref name="address-content"/>
</element></zeroOrMore>
<zeroOrMore><element name="url">
<ref name="url-content"/>
</element></zeroOrMore>
<optional><element name="note">
<ref name="note-content"/>
</element></optional>
</define>
<define name="bookmark-content">
<attribute name="hlink"><data type="IDREF"/></attribute>
</define>
@ -384,12 +427,32 @@
<optional><ref name="date-content"/></optional>
</define>
<define name="eventref-content">
<attribute name="hlink"><data type="IDREF"/></attribute>
<optional><attribute name="priv">
<ref name="priv-content"/>
</attribute></optional>
<optional><attribute name="role"><text/></attribute></optional>
<optional><element name="note">
<ref name="note-content"/>
</element></optional>
</define>
<define name="reporef-content">
<attribute name="hlink"><data type="IDREF"/></attribute>
<optional><attribute name="callno"><text/></attribute></optional>
<optional><attribute name="medium"><text/></attribute></optional>
<optional><element name="note">
<ref name="note-content"/>
</element></optional>
</define>
<define name="priv-content">
<choice>
<value>0</value>
<value>1</value>
</choice>
</define>
</define>
<define name="attribute-content">
<optional><attribute name="priv">
@ -405,40 +468,11 @@
</element></optional>
</define>
<define name="event-content">
<attribute name="type"><text/></attribute>
<optional><attribute name="priv">
<ref name="priv-content"/>
</attribute></optional>
<optional><ref name="date-content"/></optional>
<zeroOrMore><element name="witness">
<optional><attribute name="hlink">
<data type="IDREF"/>
</attribute></optional>
<optional><attribute name="name"><text/></attribute></optional>
<optional><element name="comment"><text/></element></optional>
</element></zeroOrMore>
<optional><element name="place">
<attribute name="hlink"><data type="IDREF"/></attribute>
</element></optional>
<optional><element name="cause"><text/></element></optional>
<optional><element name="description"><text/></element></optional>
<optional><element name="note">
<ref name="note-content"/>
</element></optional>
<optional><ref name="date-content"/></optional>
<zeroOrMore><element name="sourceref">
<ref name="sourceref-content"/>
</element></zeroOrMore>
<zeroOrMore><element name="objref">
<ref name="objref-content"/>
</element></zeroOrMore>
</define>
<define name="url-content">
<optional><attribute name="priv">
<ref name="priv-content"/>
</attribute></optional>
<optional><attribute name="type"><text/></attribute></optional>
<attribute name="href"><text/></attribute>
<optional><attribute name="description"><text/></attribute></optional>
</define>