QSF XML file backend for gnucash-gnome2-dev branch

Derek Atkins warlord at MIT.EDU
Wed Jan 26 10:18:58 EST 2005


Neil Williams <linux at codehelp.co.uk> writes:

> /usr/share/qof/qsf ? 
>
> (/usr/share/xml already exists on my system, something to do with docbook and 
> scrollkeeper.)

No..  /usr/share/xml is the File System Standard location to store
DTDs and Schemas.  It should be /usr/share/xml/qsf.  Yes, you already
have /usr/share/xml -- that's a good thing; it's a shared, common
directory for packages to store their xml configs.  We should, too.

> Seeing as QOF will have to be installed either within GnuCash or as a library 
> for the others? I'll change QSF_SCHEMA_DIR to ${share_dir}/qof/qsf

s/qof/xml and I'll accept that.  :)

>> You don't have to go back to 2.5.2; but you should go back to 2.5.10.
>
> Done. 2.5.10 it is.

Excellent!

>> Why?  You know that a transaction note maps to 
>> <kvp type="string" path="/notes">
>
> Excellent! THANK YOU! I hadn't thought of using the path as an attribute. (I 
> know, why didn't I look at the current format . . .  )

You're welcome.

> It would be:
> <string type="kvp" path="/notes">content</string>
>
> (as long as the forward slash character is legal in an attribute - I can 
> substitute something else if need be).

Uh, wait -- how do you differentiate between a QOF_TYPE_STRING and a
QOF_TYPE_KVP of subtype string?

>> so I would think that would be relatively easy to map, 
>> no?
>
> It will be now, yes. It becomes just another parameter that certain 
> applications will understand and certain applications can ignore.

That's sort of what I thought it would be in the first place, which is
why I didn't understand why it was so hard.. ;)

> Well, 2.5.10 is sufficient for me, I'd rather use what is available. I feel 
> that GnuCash *has* suffered from using XML files that cannot be validated 
> (even after adding the <xml version=... at the top) and my desire for schema 
> validation is based on uses outside GnuCash as well as inside. It may work 
> when only one application is creating these files - I can't see how it can 
> work with lots. Reinventing all that code just to throw an error is not 
> worthwhile - I have to keep a lid on the total amount of code in QOF and 
> duplicating what already exists in a library that is already available on the 
> target is just not sensible to me.

Oh, I agree that having a format that _CAN_ be validated is a Good
Thing.  I just think that _doing_ the validation isn't worthwhile.
But so long as 2.5.10 is "good enough" and has the validation pieces
you need, I have no complaints.  :)

-derek
-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available


More information about the gnucash-devel mailing list