[Gnucash-changes] r13713 - gnucash/trunk - Work around the fact that a validating XML parser barfs on gnucash's

Derek Atkins warlord at MIT.EDU
Thu Mar 30 15:40:56 EST 2006


Quoting David Hampton <hampton-gnucash at rainbolthampton.net>:

> On Thu, 2006-03-30 at 14:25 -0500, Josh Sled wrote:
>> On Thu, 2006-03-30 at 14:13 -0500, David Hampton wrote:
>> >   <gnc:count-data cd:type="commodity">161</gnc:count-data>
>> >
>> > Gnucash writes the <gnc:count-data> tag with an attribute named
>> > 'cd:type' but doesn't declare the 'cd' namespace.  (The declaration of
>> > 'cd' that you see on line 6 of the data file is in the wrong scope.)
>>
>> What do you mean by "wrong scope"?
>
> To be valid the tag needs be:
>
>  <gnc:count-data xmlns:cd="http://www.gnucash.org/XML/cd"
>                  cd:type="commodity">161</gnc:count-data>
>
>> From what I've read its extremely uncommon to put attributes into a
> namespace, so this really should be just:
>
>  <gnc:count-data type="commodity">161</gnc:count-data>
>
> but that would break compatibility with the 1.8 parsing code.

We should put code in now to read both cd:type= and type= ... so we can
drop the cd: at a later date.

> David

-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