diff --git a/facho/fe/fe.py b/facho/fe/fe.py index b137731..51e73b2 100644 --- a/facho/fe/fe.py +++ b/facho/fe/fe.py @@ -91,7 +91,8 @@ class FeXML(FachoXML): xmlns_name = {v: k for k, v in NAMESPACES.items()}[root_namespace] return super().tostring(**kw)\ .replace(xmlns_name + ':', '')\ - .replace('xmlns:'+xmlns_name, 'xmlns') + .replace('xmlns:'+xmlns_name, 'xmlns')\ + .replace('schemaLocation', 'xsi:schemaLocation') class DianXMLExtensionCUDFE(FachoXMLExtension): diff --git a/facho/fe/nomina/__init__.py b/facho/fe/nomina/__init__.py index 3f5c71c..4708a84 100644 --- a/facho/fe/nomina/__init__.py +++ b/facho/fe/nomina/__init__.py @@ -320,9 +320,12 @@ class DIANNominaXML: self.tag_document = tag_document self.fexml = fe.FeXML(tag_document, 'dian:gov:co:facturaelectronica:NominaIndividual') + + schemaLocation = "dian:gov:co:facturaelectronica:NominaIndividual NominaIndividualElectronicaXSD.xsd" if schemaLocation is not None: - self.fexml.root.set("SchemaLocation", schemaLocation) + self.fexml.root.set("SchemaLocation", "") + self.fexml.root.set("schemaLocation", schemaLocation) # layout, la dian requiere que los elementos # esten ordenados segun el anexo tecnico