2007-07-10 Alex Roitman <shura@gramps-project.org>

* src/GrampsDb/_GrampsDbWriteXML.py (write_date): Write datespan.
	* src/GrampsDbUtils/_ReadXML.py: (start_compound_date): Add new
	method; (start_datespan): Add new method.
	* data/grampsxml.dtd: Add datespan.
	* data/grampsxml.rng: Add datespan.



svn: r8712
This commit is contained in:
Alex Roitman
2007-07-11 04:56:11 +00:00
parent b836a61cff
commit 5984415471
5 changed files with 45 additions and 9 deletions

View File

@@ -111,7 +111,7 @@ GENDER has values of M, F, or U.
<!ELEMENT gender (#PCDATA)>
<!ELEMENT name (first?,call?,last?,suffix?,patronymic?,title?,
(daterange|dateval|datestr)?,noteref*,sourceref*)>
(daterange|datespan|dateval|datestr)?,noteref*,sourceref*)>
<!ATTLIST name
alt (0|1) #IMPLIED
type CDATA #IMPLIED
@@ -147,8 +147,8 @@ GENDER has values of M, F, or U.
rel CDATA #REQUIRED
>
<!ELEMENT address ((daterange|dateval|datestr)?,street?,city?,county?,state?,
country?,postal?,phone?,noteref*,sourceref*)>
<!ELEMENT address ((daterange|datespan|dateval|datestr)?,street?,city?,
county?,state?,country?,postal?,phone?,noteref*,sourceref*)>
<!ATTLIST address priv (0|1) #IMPLIED>
<!ELEMENT street (#PCDATA)>
@@ -201,7 +201,7 @@ EVENT
-->
<!ELEMENT events (event)*>
<!ELEMENT event (type?,(daterange|dateval|datestr)?,place?,cause?,
<!ELEMENT event (type?,(daterange|datespan|dateval|datestr)?,place?,cause?,
description?,attribute*,noteref*,sourceref*,objref*)>
<!ATTLIST event
id CDATA #REQUIRED
@@ -271,8 +271,8 @@ OBJECTS
<!ELEMENT objects (object)*>
<!ELEMENT object (file,attribute*,noteref*,(daterange|dateval|datestr)?,
sourceref*)>
<!ELEMENT object (file,attribute*,noteref*,
(daterange|datespan|dateval|datestr)?,sourceref*)>
<!ATTLIST object
id CDATA #REQUIRED
handle ID #REQUIRED
@@ -358,6 +358,14 @@ SHARED ELEMENTS
cformat CDATA #IMPLIED
>
<!ELEMENT datespan EMPTY>
<!ATTLIST datespan
start CDATA #REQUIRED
stop CDATA #REQUIRED
quality (estimated|calculated) #IMPLIED
cformat CDATA #IMPLIED
>
<!ELEMENT dateval EMPTY>
<!ATTLIST dateval
val CDATA #REQUIRED

View File

@@ -263,6 +263,15 @@
</choice></attribute></optional>
<optional><attribute name="cformat"><text/></attribute></optional>
</element>
<element name="datespan">
<attribute name="start"><text/></attribute>
<attribute name="stop"><text/></attribute>
<optional><attribute name="quality"><choice>
<value>estimated</value>
<value>calculated</value>
</choice></attribute></optional>
<optional><attribute name="cformat"><text/></attribute></optional>
</element>
<element name="dateval">
<attribute name="val"><text/></attribute>
<optional><attribute name="cformat"><text/></attribute></optional>