Difference between revisions of "Gramps XML"
m (→Gramps XML Resources: show trunk as separate) |
m (update a little and add trunk) |
||
Line 1: | Line 1: | ||
{{languages|GRAMPS_XML}} | {{languages|GRAMPS_XML}} | ||
− | ''' | + | '''Gramps XML''' is the 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. | The reason XML is not used by Gramps as the working database ("internal") format is performance, specifically memory considerations. | ||
==Gramps XML Resources== | ==Gramps XML Resources== | ||
− | Starting with XML 1.0, each revision of 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/ http://www.gramps-project.org/xml/]. | + | 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/ http://www.gramps-project.org/xml/]. |
{| class="wikitable sortable" | {| class="wikitable sortable" | ||
Line 21: | Line 21: | ||
|} | |} | ||
− | 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] | + | 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] |
For versions of Gramps earlier than 3.1.1 refer to the table to decide which version to use to import a specific version of the xml, consult the table below. | For versions of Gramps earlier than 3.1.1 refer to the table to decide which version to use to import a specific version of the xml, consult the table below. | ||
Line 83: | Line 83: | ||
|} | |} | ||
− | + | To convert the old Gramps XML file you could use VirtualBox or Vmware and the old lgenealogy images from: | |
− | http://ftp.gwdg.de/pub/linux/gramps/ | + | http://ftp.gwdg.de/pub/linux/gramps/ |
− | + | ||
===DTD generation=== | ===DTD generation=== |
Revision as of 08:27, 11 February 2013
Gramps XML is the 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.
Contents
Gramps XML Resources
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 | Example | Changes/Note |
---|---|---|---|---|
Trunk | Unreleased 1.6 grampsxml.dtd |
Unreleased >= 1.0.0 - best 1.5.0 |
Unreleased example.gramps |
Unreleased |
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]
For versions of Gramps earlier than 3.1.1 refer to the table to decide which version to use to import a specific version of the xml, consult the table below.
Gramps release | XML version | Imports XML version | Example | Changes/Note |
---|---|---|---|---|
3.4.x | 1.5.0 | >= 1.0.0 - best 1.4.0 | [2] | Citations support Gramps XML is now idempotent[3].4365 |
3.3.x | 1.4.0 | >= 1.0.0 - best 1.3.0 | [4] | Changes |
3.1.x | 1.3.0 | >= 1.0.0 - best 1.1.0 | [5] | |
3.0.x | 1.2.0 | >= 1.1.0 | [6] | |
2.2.x | 1.1.0-1.1.4 | >= 0.0.0 | [7] | |
2.0.x | 1.0.0 | >= 0.0.0 | [8] | |
1.0.x | no official version (0.0.0) | - | [9] | |
0.0.x | beta software (0.0.0) | Unsupported | Unsupported |
To convert the 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 (2010-09-19) 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
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
- XSLT scripts: gramps exhibit (Michiel Nauta), Ancestors.xsl, Birthday.xsl (Gramps 1.x), Tellico scripts, lxml gramplet, Print Notes, etc ... see XPaths.
- A sample of standalone script (Adam Sampson) which parses a Gramps XML file for drawing a family tree.
- GrampsXMLview is a number of PHP scripts in combination with a Gramps XML database.
- A Joomla! component/module for uploading the Gramps XML database and for showing genealogical information and overviews.
- PhpGedView supports simple output to Gramps XML file format for the Clippings Cart and has an option to download entire Gedcom in Gramps XML form as well as being able to retrieve raw data from the SOAP web service in Gramps XML format. Still a partial support on version 4.3.0.
- Greasemonkey scripts (Michiel Nauta)
- ...