|
|
|
|
@ -155,14 +155,14 @@ gnc_schedXaction_dom_tree_create(SchedXaction *sx)
|
|
|
|
|
GDate *date;
|
|
|
|
|
gint instCount;
|
|
|
|
|
const GUID *templ_acc_guid;
|
|
|
|
|
gboolean allow_incompat = TRUE;
|
|
|
|
|
gboolean allow_2_2_incompat = TRUE;
|
|
|
|
|
|
|
|
|
|
templ_acc_guid = xaccAccountGetGUID(sx->template_acct);
|
|
|
|
|
|
|
|
|
|
/* FIXME: this should be the same as the def in io-gncxml-v2.c */
|
|
|
|
|
ret = xmlNewNode( NULL, BAD_CAST GNC_SCHEDXACTION_TAG );
|
|
|
|
|
|
|
|
|
|
if (allow_incompat)
|
|
|
|
|
if (allow_2_2_incompat)
|
|
|
|
|
xmlSetProp(ret, BAD_CAST "version", BAD_CAST schedxaction_version2_string);
|
|
|
|
|
else
|
|
|
|
|
xmlSetProp(ret, BAD_CAST "version", BAD_CAST schedxaction_version_string);
|
|
|
|
|
@ -173,7 +173,7 @@ gnc_schedXaction_dom_tree_create(SchedXaction *sx)
|
|
|
|
|
|
|
|
|
|
xmlNewTextChild( ret, NULL, BAD_CAST SX_NAME, BAD_CAST xaccSchedXactionGetName(sx) );
|
|
|
|
|
|
|
|
|
|
if (allow_incompat)
|
|
|
|
|
if (allow_2_2_incompat)
|
|
|
|
|
{
|
|
|
|
|
xmlNewTextChild( ret, NULL, BAD_CAST SX_ENABLED,
|
|
|
|
|
BAD_CAST ( sx->enabled ? "y" : "n" ) );
|
|
|
|
|
@ -219,14 +219,17 @@ gnc_schedXaction_dom_tree_create(SchedXaction *sx)
|
|
|
|
|
guid_to_dom_tree(SX_TEMPL_ACCT,
|
|
|
|
|
templ_acc_guid));
|
|
|
|
|
|
|
|
|
|
/* output freq spec */
|
|
|
|
|
fsNode = xmlNewNode(NULL, BAD_CAST SX_FREQSPEC);
|
|
|
|
|
xmlAddChild( fsNode,
|
|
|
|
|
gnc_freqSpec_dom_tree_create(
|
|
|
|
|
if (!allow_2_2_incompat)
|
|
|
|
|
{
|
|
|
|
|
/* output freq spec */
|
|
|
|
|
fsNode = xmlNewNode(NULL, BAD_CAST SX_FREQSPEC);
|
|
|
|
|
xmlAddChild( fsNode,
|
|
|
|
|
gnc_freqSpec_dom_tree_create(
|
|
|
|
|
xaccSchedXactionGetFreqSpec(sx)) );
|
|
|
|
|
xmlAddChild( ret, fsNode );
|
|
|
|
|
xmlAddChild( ret, fsNode );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (allow_incompat)
|
|
|
|
|
if (allow_2_2_incompat)
|
|
|
|
|
{
|
|
|
|
|
xmlNodePtr schedule_node = xmlNewNode(NULL, "sx:schedule");
|
|
|
|
|
GList *schedule = gnc_sx_get_schedule(sx);
|
|
|
|
|
|