* src/WriteXML.py (write_witness): Proper witness reference.

* src/ReadXML.py (start_witness): Initialize empty comment.


svn: r4543
This commit is contained in:
Alex Roitman 2005-05-11 02:00:45 +00:00
parent 4763eabff6
commit ffc5f987e9
3 changed files with 6 additions and 4 deletions

View File

@ -19,6 +19,9 @@
* src/data/tips.xml: Update tips. * src/data/tips.xml: Update tips.
* src/WriteXML.py (write_witness): Proper witness reference.
* src/ReadXML.py (start_witness): Initialize empty comment.
2005-05-10 Julio Sanchez <jsanchez@users.sourceforge.net> 2005-05-10 Julio Sanchez <jsanchez@users.sourceforge.net>
* src/po/es.po: Updated translation * src/po/es.po: Updated translation
* src/plugins/rel_es.py: Revert to more conservative relationships * src/plugins/rel_es.py: Revert to more conservative relationships

View File

@ -650,6 +650,7 @@ class GrampsParser:
def start_witness(self,attrs): def start_witness(self,attrs):
self.in_witness = 1 self.in_witness = 1
self.witness_comment = ""
if attrs.has_key('hlink'): if attrs.has_key('hlink'):
self.witness = RelLib.Witness(RelLib.Event.ID,attrs['hlink']) self.witness = RelLib.Witness(RelLib.Event.ID,attrs['hlink'])
elif attrs.has_key('ref'): elif attrs.has_key('ref'):

View File

@ -477,15 +477,13 @@ class XmlWriter:
sp = " "*index sp = " "*index
com = self.fix(w.get_comment()) com = self.fix(w.get_comment())
if w.get_type() == RelLib.Event.ID: if w.get_type() == RelLib.Event.ID:
self.g.write('%s<witness>\n' % sp) self.g.write('%s<witness hlink="%s">\n' % (sp,w.get_value()))
self.g.write(' %s<hlink>%s</hlink>\n' % (sp,w.get_value()))
if com: if com:
self.g.write(' %s<comment>%s</comment>\n' % (sp,com)) self.g.write(' %s<comment>%s</comment>\n' % (sp,com))
self.g.write('%s</witness>\n' % sp) self.g.write('%s</witness>\n' % sp)
else: else:
nm = self.fix(w.get_value()) nm = self.fix(w.get_value())
self.g.write('%s<witness>\n' % sp) self.g.write('%s<witness name="%s">\n' % (sp,nm))
self.g.write(' %s<name>%s</name>\n' % (sp,nm))
if com: if com:
self.g.write(' %s<comment>%s</comment>\n' % (sp,com)) self.g.write(' %s<comment>%s</comment>\n' % (sp,com))
self.g.write('%s</witness>\n' % sp) self.g.write('%s</witness>\n' % sp)