# Path: src/sii/lib/printing/TemplateElement.py
# class TemplateElement(object):
# 
#     @property
#     def resources(self):
#         """ Requires the return of a list of `Resource` object providing
#         the filename the template is going to expect, and the data that
#         should be inside of it.
# 
#         In case of none, return an empty list.
#         """
#         return []
# 
#     @property
#     def carta(self) -> str:
#         """ Create TeX Template for printable medium: "US Letter"
#         """
#         raise NotImplementedError
# 
#     @property
#     def oficio(self) -> str:
#         """ Create TeX Template for printable medium: "American Foolscap"
#         """
#         raise NotImplementedError
# 
#     @property
#     def thermal80mm(self) -> str:
#         """ Create TeX Template for printable medium: "Thermal endless 80mm width"
#         """
#         raise NotImplementedError


from sii.lib.lib import xml
from .TemplateElement import TemplateElement
        self.init_checks()

    def init_docvars(self):
        """ Extract Information, to be used by the individual sections once registered """
        doc = xml.wrap_xml(self.doc_xml)

        self.doc_type = doc.Documento.Encabezado.IdDoc.TipoDTE._int
        self.doc_id   = doc.Documento.Encabezado.IdDoc.Folio._int

        # Guia Despacho Specifics
        if self.doc_type == 52:
            self.doc_gd_type = doc.Documento.Encabezado.IdDoc.IndTraslado._int

    def init_checks(self):
        """ Run Global Assertions """
        if self.tex_cedible:
            if self.doc_type in (56, 61):
                raise AssertionError("NC and ND are not subject to the CEDIBLE template")

            if self.doc_type == 52:
                non_cedibles = (2, 4, 5, 7, 8)

                if self.doc_gd_type in non_cedibles:
                    raise AssertionError("GD of types {0} are not subject to a CEDIBLE template".format(non_cedibles))

    @property
    def resources(self):
        resources = []

        for name, attr in self.__dict__.items():

# Path: src/sii/lib/printing/TemplateElement.py
# class TemplateElement(object):
# 
#     @property
#     def resources(self):
#         """ Requires the return of a list of `Resource` object providing
#         the filename the template is going to expect, and the data that
#         should be inside of it.
# 
#         In case of none, return an empty list.
#         """
#         return []
# 
#     @property
#     def carta(self) -> str:
#         """ Create TeX Template for printable medium: "US Letter"
#         """
#         raise NotImplementedError
# 
#     @property
#     def oficio(self) -> str:
#         """ Create TeX Template for printable medium: "American Foolscap"
#         """
#         raise NotImplementedError
# 
#     @property
#     def thermal80mm(self) -> str:
#         """ Create TeX Template for printable medium: "Thermal endless 80mm width"
#         """
#         raise NotImplementedError


# Path: src/sii/lib/printing/Document.py
from sii.lib.lib import xml
from .TemplateElement import TemplateElement

        self.init_checks()

    def init_docvars(self):
        """ Extract Information, to be used by the individual sections once registered """
        doc = xml.wrap_xml(self.doc_xml)

        self.doc_type = doc.Documento.Encabezado.IdDoc.TipoDTE._int
        self.doc_id   = doc.Documento.Encabezado.IdDoc.Folio._int

        # Guia Despacho Specifics
        if self.doc_type == 52:
            self.doc_gd_type = doc.Documento.Encabezado.IdDoc.IndTraslado._int

    def init_checks(self):
        """ Run Global Assertions """
        if self.tex_cedible:
            if self.doc_type in (56, 61):
                raise AssertionError("NC and ND are not subject to the CEDIBLE template")

            if self.doc_type == 52:
                non_cedibles = (2, 4, 5, 7, 8)

                if self.doc_gd_type in non_cedibles:
                    raise AssertionError("GD of types {0} are not subject to a CEDIBLE template".format(non_cedibles))

    @property
    def resources(self):
        resources = []

        for name, attr in self.__dict__.items():

            if isinstance(attr, TemplateElement):