On 01-11-12 15:21, John Ralls wrote:
On Nov 1, 2012, at 3:49 AM, Ngewi Fet <[email protected]> wrote:

Hi everyone,
I have a few questions about the GnuCash XML.

Is there any XSD schema for GnuCash XML or only the RELAX NG schema? If
there is, can someone point me in the right direction.

Also, is the RELAX NG schema at:
http://svn.gnucash.org/trac/browser/gnucash/trunk/src/doc/xml/gnucash-v2.rnc
current?
Ngewi,

You can use Trang (http://www.thaiopensource.com/relaxng/trang.html) to convert 
an RNG schema to XSD.

Gnucash-v2.rnc was contributed only a few months ago, so it's current. Whether 
or not it's complete or correct is another matter.


It is fairly complete, but that's all I can say. I have tested in on some of my datafiles which are full of business objects, the author tested extensively as well. I haven't tested how it reacts on cache data stored by the importers. The author has sent in two small patches that are currently still lingering in bugzilla until I find the time to commit them.

And lastly, although the schema is pretty complete, validation against the schema doesn't guarantee a valid xml file for gnucash. There is quite some data that is stored in kvp slots. There is no way to validate the interdependencies of these slots via any form of xml shema. The kvp slots are an old design decision we have been dragging along for years and is one of the reasons you should not alter any data except via the GnuCash API.

Geert
_______________________________________________
gnucash-devel mailing list
[email protected]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel

Reply via email to