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.

