r22517 - gnucash/trunk/src/doc/xml - Add README file to explain the gnucash.rnc Relax NG schema
Geert Janssens
gjanssens at code.gnucash.org
Sat Nov 3 05:21:59 EDT 2012
Author: gjanssens
Date: 2012-11-03 05:21:59 -0400 (Sat, 03 Nov 2012)
New Revision: 22517
Trac: http://svn.gnucash.org/trac/changeset/22517
Added:
gnucash/trunk/src/doc/xml/README
Modified:
gnucash/trunk/src/doc/xml/Makefile.am
Log:
Add README file to explain the gnucash.rnc Relax NG schema
Modified: gnucash/trunk/src/doc/xml/Makefile.am
===================================================================
--- gnucash/trunk/src/doc/xml/Makefile.am 2012-11-03 08:36:28 UTC (rev 22516)
+++ gnucash/trunk/src/doc/xml/Makefile.am 2012-11-03 09:21:59 UTC (rev 22517)
@@ -1,5 +1,6 @@
EXTRA_DIST = \
+ README \
account-v2.dtd \
commodity-v2.dtd \
defaults-v1.dtd \
Added: gnucash/trunk/src/doc/xml/README
===================================================================
--- gnucash/trunk/src/doc/xml/README (rev 0)
+++ gnucash/trunk/src/doc/xml/README 2012-11-03 09:21:59 UTC (rev 22517)
@@ -0,0 +1,37 @@
+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 at 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.
+
More information about the gnucash-changes
mailing list