diff --git a/ChangeLog b/ChangeLog index a3bc41e71f..7801cb266a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2006-04-07 David Hampton + + * 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 * src/gnome-utils/gnc-main-window.c: diff --git a/src/backend/file/io-gncxml-v2.c b/src/backend/file/io-gncxml-v2.c index 19ea4f3f00..6a99ddc98b 100644 --- a/src/backend/file/io-gncxml-v2.c +++ b/src/backend/file/io-gncxml-v2.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\n", + COUNT_DATA_TAG, "cd:type", type, amount, COUNT_DATA_TAG); +#endif + } type = va_arg(ap, char *);