Code Duplication    Length = 10-10 lines in 2 locations

src/ocrd_models/ocrd_page_generateds.py 2 locations

@@ 9851-9860 (lines=10) @@
9848
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
9849
        else:
9850
            outfile.write('/>%s' % (eol_, ))
9851
    def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='AlternativeImageType'):
9852
        if self.filename is not None and 'filename' not in already_processed:
9853
            already_processed.add('filename')
9854
            outfile.write(' filename=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.filename), input_name='filename')), ))
9855
        if self.comments is not None and 'comments' not in already_processed:
9856
            already_processed.add('comments')
9857
            outfile.write(' comments=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.comments), input_name='comments')), ))
9858
        if self.conf is not None and 'conf' not in already_processed:
9859
            already_processed.add('conf')
9860
            outfile.write(' conf="%s"' % self.gds_format_float(self.conf, input_name='conf'))
9861
    def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:pc="http://schema.primaresearch.org/PAGE/gts/pagecontent/2019-07-15"', name_='AlternativeImageType', fromsubclass_=False, pretty_print=True):
9862
        pass
9863
    def to_etree(self, parent_element=None, name_='AlternativeImageType', mapping_=None, nsmap_=None):
@@ 2000-2009 (lines=10) @@
1997
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
1998
        else:
1999
            outfile.write('/>%s' % (eol_, ))
2000
    def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='LabelType'):
2001
        if self.value is not None and 'value' not in already_processed:
2002
            already_processed.add('value')
2003
            outfile.write(' value=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.value), input_name='value')), ))
2004
        if self.type_ is not None and 'type_' not in already_processed:
2005
            already_processed.add('type_')
2006
            outfile.write(' type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.type_), input_name='type')), ))
2007
        if self.comments is not None and 'comments' not in already_processed:
2008
            already_processed.add('comments')
2009
            outfile.write(' comments=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.comments), input_name='comments')), ))
2010
    def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:pc="http://schema.primaresearch.org/PAGE/gts/pagecontent/2019-07-15"', name_='LabelType', fromsubclass_=False, pretty_print=True):
2011
        pass
2012
    def to_etree(self, parent_element=None, name_='LabelType', mapping_=None, nsmap_=None):