Master - saving to xml broken
Geert Janssens
geert.gnucash at kobaltwit.be
Fri Dec 2 07:50:12 EST 2016
Hi,
The last couple of days I find that the master branch breaks xml files during
save. I didn't report earlier because I had to check first whether it wasn't
due to my own branch.
Built a clean current master today, and it still saves broken xml data files.
The error message is - as usual with the backend - pretty vague:
* 13:27:04 WARN <gnc.backend> [GncXmlBackend::load()] Syntax error in Xml
File /home/janssege/Development/gnucash/testdata/KobaltTest.xac
To reproduce: open a working file and save it as xml. For my test I simply
added and remove one character of one single transaction description and then
saved the file again.
Analyzing the broken file I find:
1. there are several duplicate xml namespaces in the xmlns list: billterm, bt-
days, bt-prox, cust, employee, entry, invoice, job, order, taxtable, tte,
vendor and addr. They were in the original file as well, but only once.
2. gnc:count-data equally has a number of duplicate entries, also for business
objects only.
3. The original book only had gnc:commodity entries for currencies that are
really in use. The new book has an entry for each commodity we support.
4. all objects that didn't have slots before, now have an empty slots xml
entity. The commodities now have for example <cmdty:slots/>. Similarly there
are now also plenty of empty entities for accounts, transactions, splits, ...
This issue must have been introduced before commit dd4b8a104d0f7 on master.
That's the commit my cpp branch branches off from and I'm seeing it there as
well (albeit with a slightly different error message:* 10:54:04 WARN
<gnc.backend> [gnc_xml_be_load_from_file()] Syntax error in Xml File /home/
janssege/Development/gnucash/testdata/KobaltTest.xac)
Regards,
Geert
More information about the gnucash-devel
mailing list