gnucash/libgnucash/doc/xml
Geert Janssens a9f35ed7ae Lowercase cmake commands
A huge bikeshed fest but it distracted me enough to do it anyway.
2018-05-03 23:18:15 +02:00
..
account-v2.dtd Restructure the src directory 2017-08-10 18:45:00 +02:00
CMakeLists.txt Lowercase cmake commands 2018-05-03 23:18:15 +02:00
commodity-v2.dtd Restructure the src directory 2017-08-10 18:45:00 +02:00
defaults-v1.dtd Restructure the src directory 2017-08-10 18:45:00 +02:00
gnucash-v2.rnc Restructure the src directory 2017-08-10 18:45:00 +02:00
io-gncxml-version1.dtd Restructure the src directory 2017-08-10 18:45:00 +02:00
io-gncxml-version2.dtd Restructure the src directory 2017-08-10 18:45:00 +02:00
preferences-v1.dtd Restructure the src directory 2017-08-10 18:45:00 +02:00
prices-v1.dtd Restructure the src directory 2017-08-10 18:45:00 +02:00
README Restructure the src directory 2017-08-10 18:45:00 +02:00
transactions-v2.dtd Restructure the src directory 2017-08-10 18:45:00 +02:00
types.dtd Restructure the src directory 2017-08-10 18:45:00 +02:00

XML Files
---------

In this directory you will find schema and dtd files related to the GnuCash
xml file format.

WARNING:  Please be aware that these files are informative only.
GnuCash doesn't use them in any way. Their only function is to document
(parts of) the xml data format's internals.

Probably the most complete file is gnucash.rnc. As of November 2012, this
is a fairly complete Relax NG representation for the GnuCash xml format.

You could use this file to validate any gnucash xml file. But note the above
warning. If you get validation errors on a file generated by GnuCash that
probably means the relax ng schema is out of date or for the wrong version
and not that the gnucash file is incorrect.

There are a couple of ways to use the Relax NG schema:
1. convert to xml format and then use xmllint:
trang gnucash-v2.rnc gnucash-v2.rng
xmllint --relaxng gnucash-v2.rng --noout test.gnucash

2. Use the file as is with jing:
jing -c gnucash-v2.rnc test.gnucash
echo $?   (just to check, jing is silent on success)

Both trang and jing can be found here:
http://code.google.com/p/jing-trang/

If you have any questions with validation errors with your files, just send
a note on the gnucash-user@gnucash.org mailing list.

A small note from the last author (Baptiste Carvello):
Most probably you will find some cases where the schema is too constrained, as
I've tried to be quite strict.