(self, xml_element)
Extend xml_element with set DC fields.

        :param xml_element: etree element
Extend xml_element with set DC fields.
Extend xml_element with set DC fields .
def _extend_xml(self, xml_element):
        '''Extend xml_element with set DC fields.

        :param xml_element: etree element
        '''
        DCELEMENTS_NS = 'http://purl.org/dc/elements/1.1/'

        for elem in ['contributor', 'coverage', 'creator', 'date',
                     'description', 'language', 'publisher', 'relation',
                     'rights', 'source', 'subject', 'title', 'type', 'format',
                     'identifier']:
            if hasattr(self, '_dcelem_%s' % elem):
                for val in getattr(self, '_dcelem_%s' % elem) or []:
                    node = xml_elem('{%s}%s' % (DCELEMENTS_NS, elem),
                                    xml_element)
                    node.text = val
def _extend_xml ( self , xml_element ) : DCELEMENTS_NS = 'http://purl.org/dc/elements/1.1/' for elem in [ 'contributor' , 'coverage' , 'creator' , 'date' , 'description' , 'language' , 'publisher' , 'relation' , 'rights' , 'source' , 'subject' , 'title' , 'type' , 'format' , 'identifier' ] : if hasattr ( self , '_dcelem_%s' % elem ) : for val in getattr ( self , '_dcelem_%s' % elem ) or [ ] : node = xml_elem ( '{%s}%s' % ( DCELEMENTS_NS , elem ) , xml_element ) node . text = val