r21577 - gnucash/trunk/src/backend/xml - Fix xml backend to load and save invoice kvp values.

John Ralls jralls at ceridwen.us
Tue Dec 6 13:08:58 EST 2011


On Dec 6, 2011, at 8:56 AM, Derek Atkins wrote:

> John Ralls <jralls at ceridwen.us> writes:
> 
>> There's a catch here: An XML file can have an element or not, and as
>> long as the file isn't validated against a schema that declares the
>> element mandatory (and Gnucash doesn't use schema validation AFAIK),
>> if it's not there no problem, so 2.4.8 can read the file and be happy
>> if there aren't any credit memos.
> 
> That's not completely true.  The GnuCash XML backend is hand-coded, and
> historically it will complain if it sees an element that it does not
> know about.  So no, it is not validated, but it is rather rigid in its
> reading (at least historically).  Feel free to try it.  :)
> 
> It might not error out, per se, but it will cause load failures.
> 

Sorry, I meant the other way around: It doesn't complain if an element is missing unless there's code that looks for that element, nor does it save elements that it doesn't use. That's what would allow almost all users (the ones who have no interest in credit notes) of the XML backend to still be able to move from one version to another without problems.

>> One last thing: I don't think that we want to make a change breaking
>> file/db compatibility in the middle of a release series. If it's
>> required the feature should wait for 2.6 -- so we branch 2.5 soon and
>> the one or two users who are loud about wanting the feature can use
>> test versions.
> 
> I agree, but we want to make the change so that you can still use 2.6
> w/o using the new feature and still load the data file into 2.4.

Roger.

Regards,
John Ralls


More information about the gnucash-devel mailing list