7102: XML: Gramps does not export 'very low' value (0) for confidence into citation
svn: r23289
This commit is contained in:
parent
78d5b0c137
commit
3575f63cbd
@ -580,7 +580,8 @@ class GrampsXmlWriter(UpdateCallback):
|
||||
self.write_primary_tag("citation", citation, index)
|
||||
self.write_date(citation.get_date_object(), index+1)
|
||||
self.write_line("page", citation.get_page(), index+1)
|
||||
self.write_line("confidence", citation.get_confidence_level(), index+1)
|
||||
self.write_line_always("confidence",
|
||||
citation.get_confidence_level(), index+1)
|
||||
self.write_note_list(citation.get_note_list(), index+1)
|
||||
self.write_media_list(citation.get_media_list(), index+1)
|
||||
self.write_srcattribute_list(citation.get_attribute_list(), index+1)
|
||||
@ -846,13 +847,18 @@ class GrampsXmlWriter(UpdateCallback):
|
||||
|
||||
def write_line_nofix(self,tagname,value,indent=1):
|
||||
"""Writes a line, but does not escape characters.
|
||||
Use this instead of write_line is the value is already fixed,
|
||||
Use this instead of write_line if the value is already fixed,
|
||||
this avoids & becoming &
|
||||
"""
|
||||
if value:
|
||||
self.g.write('%s<%s>%s</%s>\n' %
|
||||
(' '*indent, tagname, value, tagname))
|
||||
|
||||
def write_line_always(self,tagname,value,indent=1):
|
||||
"""Writes a line, always, even with a zero value."""
|
||||
self.g.write('%s<%s>%s</%s>\n' %
|
||||
(' '*indent,tagname,self.fix(value),tagname))
|
||||
|
||||
def get_iso_date(self,date):
|
||||
if date[2] == 0:
|
||||
y = "????"
|
||||
|
Loading…
Reference in New Issue
Block a user