def METHOD_NAME(imagem, lst_materias, dic_cabecalho, lst_rodape):
    """Funcao pricipal que gera a estrutura global do arquivo rml"""
    arquivoPdf = str(int(time.time() * 100)) + ".pdf"
    tmp_data = ''
    tmp_data += '<?xml version="1.0" encoding="utf-8" standalone="no" ?>\n'
    tmp_data += '<!DOCTYPE document SYSTEM "rml_1_0.dtd">\n'
    tmp_data += '<document filename="relatorio.pdf">\n'
    tmp_data += '\t<template pageSize="(21cm, 29.7cm)" title="Relatorio de Materias" author="Interlegis" allowSplitting="20">\n'
    tmp_data += '\t\t<pageTemplate id="first">\n'
    tmp_data += '\t\t\t<pageGraphics>\n'
    tmp_data += cabecalho(dic_cabecalho, imagem)
    tmp_data += rodape(lst_rodape)
    tmp_data += '\t\t\t</pageGraphics>\n'
    tmp_data += '\t\t\t<frame id="first" x1="2cm" y1="4cm" width="17cm" height="21cm"/>\n'
    tmp_data += '\t\t</pageTemplate>\n'
    tmp_data += '\t</template>\n'
    tmp_data += paraStyle()
    tmp_data += materias(lst_materias)
    tmp_data += '</document>\n'
    tmp_pdf = parseString(tmp_data)
    return tmp_pdf