Difference between revisions of "Gramps XML"

From Gramps
Jump to: navigation, search
(Gramps XML Resources)
(7 intermediate revisions by the same user not shown)
Line 23: Line 23:
 
|}
 
|}
  
{{man note|Note:|Commencing with Gramps 3.1.2 all official versions of Gramps XML files can be imported. However, a warning will be given on import of 1.0.0 XML.[http://sourceforge.net/mailarchive/message.php?msg_id=23262334]<br /><br />'''Note:''' For versions of Gramps earlier than 3.1.1 refer to the consult the table below to decide which version to use to import a specific version of the XML, consult the table below.}}
+
{{man note|Note|Commencing with Gramps 3.1.2 all official versions of Gramps XML files can be imported. However, a warning will be given on import of 1.0.0 XML.[http://sourceforge.net/p/gramps/mailman/message/23262334/]<br /><br />'''Note:''' For versions of Gramps earlier than 3.1.1 refer to and the consult the table below to decide which version to use to import a specific version of the XML.}}
  
 
{| class="wikitable sortable"
 
{| class="wikitable sortable"
Line 32: Line 32:
 
!Example
 
!Example
 
!Changes/Note
 
!Changes/Note
 +
|-
 +
| 5.0.x
 +
| 1.7.0 - 1.7.1
 +
| >= 1.0.0 - 1.7
 +
| 18
 +
|[{{Code Browser}}/tree/maintenance/gramps50/example/gramps/example.gramps]
 +
|
 +
* Database backends become plugins
 +
* BSDDB is default
 +
* DB-API (SQL) is tested as viable replacement
 
|-
 
|-
 
| 4.2.x
 
| 4.2.x
Line 38: Line 48:
 
| 18
 
| 18
 
|[{{Code Browser}}/tree/maintenance/gramps42/example/gramps/example.gramps]
 
|[{{Code Browser}}/tree/maintenance/gramps42/example/gramps/example.gramps]
|added PlaceNames (with Date and Language) Place<br />
+
|
 +
* Added PlaceNames (with Date and Language) Place
 
|-
 
|-
 
| 4.1.x
 
| 4.1.x
Line 45: Line 56:
 
| 17
 
| 17
 
|[{{Code Browser}}/tree/maintenance/gramps41/example/gramps/example.gramps]
 
|[{{Code Browser}}/tree/maintenance/gramps41/example/gramps/example.gramps]
|added Tags to Event, Place, Repository, Source, and Citation<br />
+
|
Source/Citation.data became SourceAttributes<br />
+
* added Tags to Event, Place, Repository, Source, and Citation
added optional support for checksum on Media object<br />
+
* Source/Citation.data became SourceAttributes
added PlaceRef and Place Hierarchies<br />
+
* added optional support for checksum on Media object
 +
* added PlaceRef and Place Hierarchies
 
|-
 
|-
 
|4.0.x
 
|4.0.x
Line 62: Line 74:
 
|16
 
|16
 
|[{{Code Browser}}/tree/maintenance/gramps34/example/gramps/example.gramps]
 
|[{{Code Browser}}/tree/maintenance/gramps34/example/gramps/example.gramps]
|Citations support<br />
+
|
Gramps XML is now idempotent[http://en.wikipedia.org/wiki/Idempotence].{{bug|4365}}<br />
+
* Citations support
Exporter does not change records order any more, making it easier to look at differences between versions/revisions.
+
* Gramps XML is now idempotent[http://en.wikipedia.org/wiki/Idempotence].{{bug|4365}}
 +
* Exporter does not change records order any more, making it easier to look at differences between versions/revisions.
 
|-
 
|-
 
|3.3.x
 
|3.3.x
Line 71: Line 84:
 
|15
 
|15
 
|[{{Code Browser}}/tree/maintenance/gramps33/example/gramps/example.gramps]
 
|[{{Code Browser}}/tree/maintenance/gramps33/example/gramps/example.gramps]
|Added new field "locality" to the Place schema<br />
+
|
Added surnames to the Name schema (surnames is a list of surnames / prefix and patronymic are moved to the surname)<br />
+
* Added new field "locality" to the Place schema
Replaced Markers with Tags ( marker removed from all / tags added to Person, Media, Family, and Notes)<br />
+
* Added surnames to the Name schema (surnames is a list of surnames / prefix and patronymic are moved to the surname)
Transaction<br />
+
* Replaced Markers with Tags ( marker removed from all / tags added to Person, Media, Family, and Notes)
Merging<br />
+
* Transaction
Improvements on Import/Export file formats (vcard, gedcom, xml)<br />
+
* Merging
[[Gramps_3.3_Wiki_Manual_-_What%27s_new%3F#Database Changes]]
+
* Improvements on Import/Export file formats (vcard, gedcom, xml)
 +
* [[Gramps_3.3_Wiki_Manual_-_What%27s_new%3F#Database Changes]]
 
|-
 
|-
 
|3.1.x
 
|3.1.x
Line 84: Line 98:
 
|15
 
|15
 
|[{{Code Browser}}/tree/maintenance/gramps31/example/gramps/example.gramps]
 
|[{{Code Browser}}/tree/maintenance/gramps31/example/gramps/example.gramps]
| Added lat/long to places
+
|
 +
* Added lat/long to places
 
|-
 
|-
 
|3.0.x
 
|3.0.x
Line 91: Line 106:
 
|14
 
|14
 
|[{{Code Browser}}/tree/maintenance/gramps30/example/gramps/example.gramps]
 
|[{{Code Browser}}/tree/maintenance/gramps30/example/gramps/example.gramps]
| added newyear to Dates<br />Replace plain text with StyledText in Notes
+
|  
 +
* added newyear to Dates
 +
* Replace plain text with StyledText in Notes
 
|-
 
|-
 
|2.2.x
 
|2.2.x
 
|1.1.0-1.1.4
 
|1.1.0-1.1.4
 
| >= 0.0.0
 
| >= 0.0.0
|
+
|13
 
|[{{Code Browser}}/tree/maintenance/gramps22/example/gramps/data.gramps]
 
|[{{Code Browser}}/tree/maintenance/gramps22/example/gramps/data.gramps]
 
|
 
|
Line 105: Line 122:
 
|13
 
|13
 
|[{{Code Browser}}/tree/maintenance/gramps20/gramps2/example/gramps/data.gramps]
 
|[{{Code Browser}}/tree/maintenance/gramps20/gramps2/example/gramps/data.gramps]
| changed name formats
+
|  
 +
* changed name formats
 
|-
 
|-
 
|1.0.x
 
|1.0.x
Line 156: Line 174:
 
* [[Database_Formats]]
 
* [[Database_Formats]]
 
* [[Gramps Old database]]
 
* [[Gramps Old database]]
 +
* [[Previous releases of Gramps]]
  
 
[[Category:Developers/Reference]]
 
[[Category:Developers/Reference]]
 
[[Category:Developers/General]]
 
[[Category:Developers/General]]

Revision as of 03:54, 9 June 2016

Gramps XML is the Extensible Markup Language XML format designed for storing Gramps data. The goal is to have a fully portable, human- and machine-readable XML format so that the data can be read and written without any loss. In addition, XML format allows for smaller files (if compressed) and for using the version control system for tracking the changes (if uncompressed).

The reason XML is not used by Gramps as the working database ("internal") format is performance, specifically memory considerations.

Gramps XML Resources

Gramps-notes.png
Starting with Gramps XML 1.0

Each revision of Gramps XML has its own resource page, with references to that version's DTD and RELAX NG schema.
The resource pages are listed at http://www.gramps-project.org/xml/.

Gramps release XML version Imports XML version Database Example Changes/Note
master no change against 4.2 yet >= 1.0.0 - best 1.7 18 Unreleased
example.gramps
Unreleased
Gramps-notes.png
Note

Commencing with Gramps 3.1.2 all official versions of Gramps XML files can be imported. However, a warning will be given on import of 1.0.0 XML.[1]

Note: For versions of Gramps earlier than 3.1.1 refer to and the consult the table below to decide which version to use to import a specific version of the XML.

Gramps release XML version Imports XML version Database Example Changes/Note
5.0.x 1.7.0 - 1.7.1 >= 1.0.0 - 1.7 18 [2]
  • Database backends become plugins
  • BSDDB is default
  • DB-API (SQL) is tested as viable replacement
4.2.x 1.7.0 - 1.7.1 >= 1.0.0 - 1.7 18 [3]
  • Added PlaceNames (with Date and Language) Place
4.1.x 1.6.0 >= 1.0.0 - best 1.5.1 17 [4]
  • added Tags to Event, Place, Repository, Source, and Citation
  • Source/Citation.data became SourceAttributes
  • added optional support for checksum on Media object
  • added PlaceRef and Place Hierarchies
4.0.x 1.5.0 - 1.5.1 >= 1.0.0 - best 1.4.0 16 [5] -
3.4.x 1.5.0 - 1.5.1 >= 1.0.0 - best 1.4.0 16 [6]
  • Citations support
  • Gramps XML is now idempotent[7].4365
  • Exporter does not change records order any more, making it easier to look at differences between versions/revisions.
3.3.x 1.4.0 >= 1.0.0 - best 1.3.0 15 [8]
  • Added new field "locality" to the Place schema
  • Added surnames to the Name schema (surnames is a list of surnames / prefix and patronymic are moved to the surname)
  • Replaced Markers with Tags ( marker removed from all / tags added to Person, Media, Family, and Notes)
  • Transaction
  • Merging
  • Improvements on Import/Export file formats (vcard, gedcom, xml)
  • Gramps_3.3_Wiki_Manual_-_What's_new?#Database Changes
3.1.x 1.3.0 >= 1.0.0 - best 1.1.0 15 [9]
  • Added lat/long to places
3.0.x 1.2.0 >= 1.1.0 14 [10]
  • added newyear to Dates
  • Replace plain text with StyledText in Notes
2.2.x 1.1.0-1.1.4 >= 0.0.0 13 [11]
2.0.x 1.0.0 >= 0.0.0 13 [12]
  • changed name formats
1.0.x no official version (0.0.0) - [13]
0.0.x beta software (0.0.0) Unsupported Unsupported Unsupported
Gramps-notes.png
Note:

To convert an old Gramps XML file you could use VirtualBox or Vmware and the old lgenealogy images from:
http://ftp.gwdg.de/pub/linux/gramps/

DTD generation

Tool like xml2dtd could help people not familiar with DTD grammar by generating a DTD file from a XML file. New content on Gramps XML could be tested with the tool and be merged on current Gramps DTD.

RELAX NG generation

Tools like trang or NekoDTD could help to convert a Gramps DTD file to a RELAX NG file. Some others tools and up-to-date informations are listed on this page.

Validating Gramps XML file

To validate the Gramps XML file against its DTD, use xmllint program (comes with the libxml2-utils package):

xmllint --noout filename.gramps
Gnome-important.png
If the Gramps XML file does not validate

this indicates an error in either the DTD or the XML Writer.
Please file the bug report at http://bugs.gramps-project.org in that case.

Parsing Gramps XML file

See also