* src/GrampsDb/_GrampsDbWriteXML.py (write_xml_data): Place notes
at the end. svn: r8200
This commit is contained in:
parent
c076ac0f83
commit
302e3f1dbc
@ -1,4 +1,6 @@
|
||||
2007-02-20 Alex Roitman <shura@gramps-project.org>
|
||||
* src/GrampsDb/_GrampsDbWriteXML.py (write_xml_data): Place notes
|
||||
at the end.
|
||||
* src/GrampsDbUtils/_ReadXML.py (start_noteref): Add method;
|
||||
(__init__): Use new method.
|
||||
|
||||
|
@ -252,16 +252,6 @@ class GrampsDbXmlWriter(object):
|
||||
# by the time we get to person's names
|
||||
self.write_name_formats()
|
||||
|
||||
if note_len > 0:
|
||||
self.g.write(" <notes>\n")
|
||||
sorted_keys = self.db.get_gramps_ids(NOTE_KEY)
|
||||
sorted_keys.sort()
|
||||
for gramps_id in sorted_keys:
|
||||
note = self.db.get_note_from_gramps_id(gramps_id)
|
||||
self.write_note(note,2)
|
||||
self.status.heartbeat()
|
||||
self.g.write(" </notes>\n")
|
||||
|
||||
if event_len > 0:
|
||||
self.g.write(" <events>\n")
|
||||
sorted_keys = self.db.get_gramps_ids(EVENT_KEY)
|
||||
@ -339,6 +329,16 @@ class GrampsDbXmlWriter(object):
|
||||
self.status.heartbeat()
|
||||
self.g.write(" </repositories>\n")
|
||||
|
||||
if note_len > 0:
|
||||
self.g.write(" <notes>\n")
|
||||
sorted_keys = self.db.get_gramps_ids(NOTE_KEY)
|
||||
sorted_keys.sort()
|
||||
for gramps_id in sorted_keys:
|
||||
note = self.db.get_note_from_gramps_id(gramps_id)
|
||||
self.write_note(note,2)
|
||||
self.status.heartbeat()
|
||||
self.g.write(" </notes>\n")
|
||||
|
||||
# Data is written, now write bookmarks.
|
||||
self.write_bookmarks()
|
||||
|
||||
|
@ -1134,7 +1134,9 @@ class GrampsParser(UpdateCallback):
|
||||
handle = attrs['hlink'].replace('_','')
|
||||
self.db.check_note_from_handle(handle,self.trans)
|
||||
|
||||
if self.address:
|
||||
if self.source_ref:
|
||||
self.source_ref.add_note(handle)
|
||||
elif self.address:
|
||||
self.address.add_note(handle)
|
||||
elif self.ord:
|
||||
self.ord.add_note(handle)
|
||||
|
Loading…
Reference in New Issue
Block a user