2006-07-27 Alex Roitman <shura@gramps-project.org>

* src/GrampsDb/_GrampsBSDDB.py (_load_metadata): Upgrade custom
	name formats.
	* src/GrampsDb/_ReadXML.py (start_format): Attempt parsing the
	active state for the custom name format.
	* src/GrampsDb/_WriteXML.py (write_name_formats): Write 4-tuple
	custom name formats; 
	(_xml_version): Output as version 1.1.1.
	* data/grampsxml.rng: Update XML description for 1.1.1.
	* data/grampsxml.dtd: Update XML description for 1.1.1.
	* src/ViewManager.py (post_load_newdb): Revert changes (done on
	the lower level).
	* src/NameDisplay.py (register_custom_formats): Revert changes (done on
	the lower level).



svn: r7085
This commit is contained in:
Alex Roitman
2006-07-27 17:44:02 +00:00
parent 1d9e6da05a
commit 787fe452e1
8 changed files with 66 additions and 28 deletions

View File

@@ -24,15 +24,15 @@
-->
<!--
This is the Document Type Definition file for v1.1.0
This is the Document Type Definition file for v1.1.1
of the GRAMPS XML genealogy data format.
Please use the following formal public identifier to identify it:
"-//GRAMPS//DTD GRAMPS XML V1.1.0//EN"
"-//GRAMPS//DTD GRAMPS XML V1.1.1//EN"
For example:
<!DOCTYPE database PUBLIC "-//GRAMPS//DTD GRAMPS XML V1.1.0//EN"
"http://gramps-project.org/xml/1.1.0/grampsxml.dtd"
<!DOCTYPE database PUBLIC "-//GRAMPS//DTD GRAMPS XML V1.1.1//EN"
"http://gramps-project.org/xml/1.1.1/grampsxml.dtd"
[...]>
-->
@@ -51,9 +51,9 @@ DATABASE
bookmarks
-->
<!ELEMENT database (header, events?, people?, families?, sources?,
places?, objects?, repositories?, bookmarks?)>
<!ATTLIST database xmlns CDATA #FIXED "http://gramps-project.org/xml/1.1.0/">
<!ELEMENT database (header, events?, people?, families?, sources?, places?,
objects?, repositories?, bookmark?, name-formats?)>
<!ATTLIST database xmlns CDATA #FIXED "http://gramps-project.org/xml/1.1.1/">
<!-- ************************************************************
HEADER
@@ -312,6 +312,19 @@ BOOKMARKS
hlink IDREF #REQUIRED
>
<!-- ************************************************************
NAME FORMATS
-->
<!ELEMENT name-formats (format)*>
<!ELEMENT format EMPTY>
<!ATTLIST format
number CDATA #REQUIRED
name CDATA #REQUIRED
fmt_str CDATA #REQUIRED
active (0|1) #IMPLIED
>
<!-- ************************************************************
SHARED ELEMENTS
-->

View File

@@ -31,7 +31,7 @@
<grammar
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
ns="http://gramps-project.org/xml/1.1.0/"
ns="http://gramps-project.org/xml/1.1.1/"
xmlns="http://relaxng.org/ns/structure/1.0">
<start><element name="database">
@@ -98,6 +98,11 @@
</element></zeroOrMore>
</element></optional>
<optional><element name="name-formats">
<zeroOrMore><element name="format">
<ref name="format-content"/>
</element></zeroOrMore>
</element></optional>
</element></start>
<define name="researcher-content">
@@ -431,6 +436,16 @@
<attribute name="hlink"><data type="IDREF"/></attribute>
</define>
<define name="format-content">
<attribute name="number"><text/></attribute>
<attribute name="name"><text/></attribute>
<attribute name="fmt_str"><text/></attribute>
<optional><attribute name="active"><choice>
<value>0</value>
<value>1</value>
</choice></attribute></optional>
</define>
<define name="note-content">
<optional><attribute name="format"><choice>
<value>0</value>