QSF XML file backend for gnucash-gnome2-dev branch

Neil Williams linux at codehelp.co.uk
Wed Jan 26 11:30:21 EST 2005


On Wednesday 26 January 2005 3:18 pm, Derek Atkins wrote:
> > 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

QSF_SCHEMA_DIR='${GNC_SHAREDIR}/xml/qsf'
in QOF
QSF_SCHEMA_DIR=`eval echo $datadir`"/xml/qsf"
data dir : /opt/garfield/qof/share

> >> Why?  You know that a transaction note maps to
> >> <kvp type="string" path="/notes">

It'd be <kvp type="kvp" path="/notes"> because each object uses "kvp" as the 
definition for each of their *_KVP macros - at least so far.

Those will be within the "Account" or "Transaction" object so that's not a 
problem, but it does remind me about object name collisions that we discussed 
earlier.

Is it possible to change 
#define GNC_ID_ACCOUNT        "Account"
etc. to
#define GNC_ID_ACCOUNT        "GNCAccount"
etc.? (or similar, just a standard prefix for all GnuCash objects - maybe gnc_ 
or GNC- ,gnc- . .  ) in gnc-engine.h ?

Are there any situations where the word is used instead of the macro?

I've used 
#define PILOT_LINK_QOF_EXPENSES "pilot-expenses"

It's only the objects that need to avoid name collisions between applications. 
It's not a problem now, I'm just thinking ahead - before too many files get 
written using a QSF tag name that then changes.

> > <string type="kvp" path="/notes">content</string>
> Uh, wait -- how do you differentiate between a QOF_TYPE_STRING and a
> QOF_TYPE_KVP of subtype string?

OK, <kvp> - I'll sort out the rest later.

> >> 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.. ;)

It was the nesting. By reproducing that in the path="", it's OK. Just needs to 
be thought through.

I'm fast running out of time this week though. The replacement patch may be 
this weekend now.

-- 

Neil Williams
=============
http://www.dcglug.org.uk/
http://www.nosoftwarepatents.com/
http://sourceforge.net/projects/isbnsearch/
http://www.neil.williamsleesmill.me.uk/
http://www.biglumber.com/x/web?qs=0x8801094A28BCB3E3

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20050126/abfad861/attachment.bin


More information about the gnucash-devel mailing list