r15486 - gnucash/trunk/src - SX "enabled" patch from Peter McAlpine <peter at aoeu.ca>.

Josh Sled jsled at asynchronous.org
Thu Feb 1 10:55:51 EST 2007


On Thu, 2007-02-01 at 09:50 -0500, Derek Atkins wrote:
> Why not store the sx:enabled flag in the SX instance KVP?  Granted, I
> dont think 2.0 has an SX KVP, but we could maybe fix that...  

Besides the fact -- as you point out -- that it doesn't solve the
problem, KVP frames aren't actually data model.  I maintain that we
should try not to use them, and if we do, only with good reason; this
doesn't feel like one.


> I'll
> point out that the 2.0 parser will barf on unknown tags and fail
> to load the data file.

Yup; as I mentioned on -devel, it might be a good thing to fix for a
2.0.{5,6}, so we get a bit of breathing room for 2.{x>0}...

To preempt your question about "how do you tell a broken datafile from
one with simply new tags?", I say: "you don't".  You let XML
well-formed-ness deal with really corrupted datafiles, and you ignore
any tags or attributes that you don't recognize.   If you then ignore
valid future data, fine; if you ignore invalid/broken data, fine.  The
utility of reading a wider set of datafiles is higher than the risk of
reading inconsistent data, with some amount of care taken in the future.

-- 
...jsled
http://asynchronous.org/ - a=jsled;b=asynchronous.org;echo ${a}@${b}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20070201/eab75b19/attachment.bin 


More information about the gnucash-devel mailing list