def render_filedesc(self, filedesc):

        fileDesc = Element('fileDesc')

        titleStmt = SubElement(fileDesc, 'titleStmt')
        SubElement(titleStmt, 'title').text = filedesc.titlestmt

        if filedesc.extent:
            SubElement(fileDesc, 'extent', {"unit": filedesc.extent['unit'],
                                            "count": filedesc.extent['count']})

        sourceDesc = SubElement(fileDesc, "sourceDesc")

        if filedesc.title:
            SubElement(sourceDesc, 'title').text = filedesc.title

        if filedesc.author:
            if 'age' in filedesc.author:
                aut = {"age": filedesc.author['age']}
            if 'sex' in filedesc.author:
                aut = {"sex": filedesc.author['sex']}

            SubElement(sourceDesc, "author", aut).text = filedesc.author['name']

        if filedesc.source:
            SubElement(sourceDesc, "source",
                       {"type": filedesc.source['type']}).text = filedesc.source['source']

        if filedesc.distributor:
            SubElement(sourceDesc, "distributor").text = filedesc.distributor

        if filedesc.publisher:
            SubElement(sourceDesc, "publisher").text = filedesc.publisher

        if filedesc.pubAddress:
            SubElement(sourceDesc, "pubAddress").text = filedesc.pubAddress

        if filedesc.eAddress:
            SubElement(sourceDesc, "eAddress",
                       {"type": filedesc.eAddress['type']}).text = filedesc.eAddress['email']

        if filedesc.pubDate:
            SubElement(sourceDesc, "pubDate", {"iso8601": filedesc.pubDate})

        if filedesc.idno:
            SubElement(sourceDesc, "idno",
                       {"type": filedesc.idno['type']}).text = filedesc.idno['number']

        if filedesc.pubName:
            SubElement(sourceDesc, "pubName",
                       {"type": filedesc.pubName['type']}).text = filedesc.pubName['text']

        if filedesc.documentation:
            SubElement(sourceDesc, "documentation").text = filedesc.documentation

        return fileDesc
Create an fileDesc Element.
dataset/ETHPy150Open cidles/graf-python/src/graf/io.py/StandoffHeaderRenderer.render_filedesc