diff --git a/gramps/src/WriteXML.py b/gramps/src/WriteXML.py index ae4c175e6..0bbb7ad85 100644 --- a/gramps/src/WriteXML.py +++ b/gramps/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)