From 27f962f69b6e7c30dcd6accac9b956ab85b7b7aa Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Wed, 8 Aug 2001 01:27:39 +0000 Subject: [PATCH] Write only mrel and frel if not empty svn: r313 --- src/WriteXML.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/WriteXML.py b/src/WriteXML.py index ae4c175e6..0bbb7ad85 100644 --- a/src/WriteXML.py +++ b/src/WriteXML.py @@ -351,8 +351,16 @@ def exportData(database, filename, callback): write_ref(g,"childof",person.getMainFamily(),3) for alt in person.getAltFamilyList(): - g.write(" \n" % \ - (alt[0].getId(), alt[1], alt[2])) + if alt[1] != "": + mrel=' mrel="%s"' % alt[1] + else: + mrel='' + if alt[2] != "": + frel=' frel="%s"' % alt[2] + else: + frel='' + g.write(" \n" % \ + (alt[0].getId(), mrel, frel)) for family in person.getFamilyList(): write_ref(g,"parentin",family,3)