* 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 1887e7cfa4
commit 822c770f7e
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/EditSource.py: Use id(self) instead of self.
* src/EventEdit.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> 2005-12-22 Don Allingham <don@gramps-project.org>
* src/AddrEdit.py: More window management * src/AddrEdit.py: More window management
* src/AttrEdit.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. of the GRAMPS XML genealogy data format.
Please use the following formal public identifier to identify it: 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: For example:
<!DOCTYPE database PUBLIC "-//GRAMPS//DTD GRAMPS XML V1.0.0//EN" <!DOCTYPE database PUBLIC "-//GRAMPS//DTD GRAMPS XML V1.1.0//EN"
"http://gramps-project.org/xml/1.0.0/grampsxml.dtd" "http://gramps-project.org/xml/1.1.0/grampsxml.dtd"
[...]> [...]>
--> -->
@ -52,7 +52,7 @@ DATABASE
<!ELEMENT database (header, people?, families?, sources?, places?, objects?, <!ELEMENT database (header, people?, families?, sources?, places?, objects?,
bookmarks?)> 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 HEADER
@ -91,14 +91,14 @@ PEOPLE
home IDREF #IMPLIED home IDREF #IMPLIED
> >
<!ELEMENT person (gender, name*, nick?, event*, lds_ord*, <!ELEMENT person (gender, name*, nick?, eventref*, lds_ord*,
objref*, address*, attribute*, url*, objref*, address*, attribute*, url*,
childof*, parentin*, note?, sourceref*)> childof*, parentin*, note?, sourceref*, marker?)>
<!ATTLIST person <!ATTLIST person
id CDATA #REQUIRED id CDATA #REQUIRED
handle ID #REQUIRED handle ID #REQUIRED
change CDATA #REQUIRED change CDATA #REQUIRED
complete (0|1) #IMPLIED priv (0|1) #IMPLIED
> >
<!-- <!--
@ -157,13 +157,13 @@ FAMILY
<!ELEMENT families (family)*> <!ELEMENT families (family)*>
<!ELEMENT family (father?,mother?,event*,lds_ord*, <!ELEMENT family (father?,mother?,eventref*,lds_ord*,
objref*,child*,attribute*,note?,sourceref*)> objref*,child*,attribute*,note?,sourceref*,marker?)>
<!ATTLIST family <!ATTLIST family
id CDATA #REQUIRED id CDATA #REQUIRED
handle ID #REQUIRED handle ID #REQUIRED
change CDATA #REQUIRED change CDATA #REQUIRED
complete (0|1) #IMPLIED priv (0|1) #IMPLIED
type CDATA #IMPLIED type CDATA #IMPLIED
> >
@ -176,17 +176,32 @@ FAMILY
<!ELEMENT child EMPTY> <!ELEMENT child EMPTY>
<!ATTLIST child hlink IDREF #REQUIRED> <!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 SOURCES
--> -->
<!ELEMENT sources (source)*> <!ELEMENT sources (source)*>
<!ELEMENT source (stitle?,sauthor?,spubinfo?,sabbrev?, <!ELEMENT source (stitle?,sauthor?,spubinfo?,sabbrev?,
note?,objref*,data_item*)> note?,objref*,data_item*,reporef*,marker?)>
<!ATTLIST source <!ATTLIST source
id CDATA #REQUIRED id CDATA #REQUIRED
handle ID #REQUIRED handle ID #REQUIRED
change CDATA #REQUIRED change CDATA #REQUIRED
priv (0|1) #IMPLIED
> >
<!ELEMENT stitle (#PCDATA)> <!ELEMENT stitle (#PCDATA)>
<!ELEMENT sauthor (#PCDATA)> <!ELEMENT sauthor (#PCDATA)>
@ -199,11 +214,12 @@ PLACES
<!ELEMENT places (placeobj)*> <!ELEMENT places (placeobj)*>
<!ELEMENT placeobj (coord?,location*,objref*,url*,note?,sourceref*)> <!ELEMENT placeobj (coord?,location*,objref*,url*,note?,sourceref*,marker?)>
<!ATTLIST placeobj <!ATTLIST placeobj
id CDATA #REQUIRED id CDATA #REQUIRED
handle ID #REQUIRED handle ID #REQUIRED
change CDATA #REQUIRED change CDATA #REQUIRED
priv (0|1) #IMPLIED
title CDATA #REQUIRED title CDATA #REQUIRED
> >
@ -230,16 +246,32 @@ OBJECTS
<!ELEMENT objects (object)*> <!ELEMENT objects (object)*>
<!ELEMENT object (attribute*,note?,(daterange|dateval|datestr)?,sourceref*)> <!ELEMENT object (attribute*,note?,(daterange|dateval|datestr)?,
sourceref*,marker?)>
<!ATTLIST object <!ATTLIST object
id CDATA #REQUIRED id CDATA #REQUIRED
handle ID #REQUIRED handle ID #REQUIRED
change CDATA #REQUIRED change CDATA #REQUIRED
priv (0|1) #IMPLIED
src CDATA #REQUIRED src CDATA #REQUIRED
mime CDATA #REQUIRED mime CDATA #REQUIRED
description 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 BOOKMARKS
@ -280,6 +312,25 @@ SHARED ELEMENTS
conf CDATA #IMPLIED 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 spage (#PCDATA)>
<!ELEMENT scomments (#PCDATA)> <!ELEMENT scomments (#PCDATA)>
<!ELEMENT sdate (#PCDATA)> <!ELEMENT sdate (#PCDATA)>
@ -292,24 +343,6 @@ SHARED ELEMENTS
value 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 comment (#PCDATA)>
<!ELEMENT place EMPTY> <!ELEMENT place EMPTY>
@ -321,6 +354,7 @@ EVENT
<!ELEMENT url EMPTY> <!ELEMENT url EMPTY>
<!ATTLIST url <!ATTLIST url
priv (0|1) #IMPLIED priv (0|1) #IMPLIED
type CDATA #IMPLIED
href CDATA #REQUIRED href CDATA #REQUIRED
description CDATA #IMPLIED description CDATA #IMPLIED
> >

View File

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