Generate the gnc:count-data tags by hand so that the attribute will be

written properly with all versions of libxml2.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13743 57a11ea4-9604-0410-9ed3-97b8803252fd
zzzoldfeatures/register-rewrite
David Hampton 20 years ago
parent cdb4c42f62
commit dcf55d0a40

@ -1,3 +1,17 @@
2006-04-07 David Hampton <hampton@employees.org>
* src/backend/file/io-gncxml-v2.c: The cvs version of libxml2
refuses to write attribute tags that don't have valid namespaces.
Since gnucash writes the root node of the XML data file by hand,
there's no node with namespaces that can be passed in to the code
that generates the gnc:count-data tags. These tags must be
generated by hand as well.
* src/backend/file/gnc-commodity-xml-v2.c: When writing a currency
to the data file, write the full commodity data block for backward
compatibility with 1.8, instead of just writing the quote source
information.
2006-04-05 David Hampton <hampton@employees.org>
* src/gnome-utils/gnc-main-window.c:

@ -779,12 +779,14 @@ write_counts(FILE* out, ...)
while(type)
{
xmlNodePtr node;
char *val;
int amount = va_arg(ap, int);
if(amount != 0)
{
#if GNUCASH_REALLY_BUILD_AN_XML_TREE_ON_OUTPUT
char *val;
xmlNodePtr node;
val = g_strdup_printf("%d", amount);
node = xmlNewNode(NULL, BAD_CAST COUNT_DATA_TAG);
@ -801,6 +803,11 @@ write_counts(FILE* out, ...)
g_free(val);
xmlFreeNode(node);
#else
fprintf(out, "<%s %s=\"%s\">%d</%s>\n",
COUNT_DATA_TAG, "cd:type", type, amount, COUNT_DATA_TAG);
#endif
}
type = va_arg(ap, char *);

Loading…
Cancel
Save