Imagen

DESCARGA SOFTWARE PARA FACTURA ELECTRONICA DE AQUI.
Facturacion, Validacion, Addendas, Librerias de programacion, etc.


ECODEX TIENE ESTOS NUEVOS DATOS DE CONTACTO :
Comercializacion y Ventas - Evelia Vicke evicke@ecodex.com.mx 33-16-03-03-48
Soporte - Humberto Guerrero soporte@ecodex.com.mx 33-34-90-46-03

Error Schemas validity

Todo lo que no cabe en los demas foros........
droid
Mensajes: 40
Registrado: Lun Sep 29, 2014 7:04 am

Error Schemas validity

Mensajepor droid » Vie May 19, 2017 3:55 pm

Buen dia.

Al intentar validar un xml de nomina 1.2 me aparece mensaje de error, quien me puede ayudar?

xmllint --noout --schema nomina12.xsd 005155.xml

005155.xml:6: element Comprobante: Schemas validity error : Element '{http://www.sat.gob.mx/cfd/3}Comprobante': No matching global declaration available for the validation root.
005155.xml fails to validate


Gracias de antemano.

fortiz
Mensajes: 221
Registrado: Vie Dic 10, 2010 8:11 am

Re: Error Schemas validity

Mensajepor fortiz » Vie May 19, 2017 4:06 pm

Hola droid

El comando debe de ser

Código: Seleccionar todo

xmllint --noout --schema cfdv33.xsd 005155.xml


y dentro del cfdv33.xsd haces el import a la definición de la nomina

Código: Seleccionar todo

 <xs:import namespace="http://www.sat.gob.mx/nomina12" schemaLocation="nomina12.xsd"/>


Tanto el cfdv33.xsd como el nomina12.xsd deben de estar en el mismo directorio

droid
Mensajes: 40
Registrado: Lun Sep 29, 2014 7:04 am

Re: Error Schemas validity

Mensajepor droid » Vie May 19, 2017 4:47 pm

@fortiz, ahora me envia esta lista de errores, usando el comando xmllint --noout --schema cfdv33.xsd 005155.xml

Código: Seleccionar todo

005155.xml:6: element Comprobante: Schemas validity error : Element '{http://www.sat.gob.mx/cfd/3}Comprobante', attribute 'version': The attribute 'version' is not allowed.
005155.xml:6: element Comprobante: Schemas validity error : Element '{http://www.sat.gob.mx/cfd/3}Comprobante', attribute 'serie': The attribute 'serie' is not allowed.
005155.xml:6: element Comprobante: Schemas validity error : Element '{http://www.sat.gob.mx/cfd/3}Comprobante', attribute 'folio': The attribute 'folio' is not allowed.
005155.xml:6: element Comprobante: Schemas validity error : Element '{http://www.sat.gob.mx/cfd/3}Comprobante', attribute 'fecha': The attribute 'fecha' is not allowed.
005155.xml:6: element Comprobante: Schemas validity error : Element '{http://www.sat.gob.mx/cfd/3}Comprobante', attribute 'tipoDeComprobante': The attribute 'tipoDeComprobante' is not allowed.
005155.xml:6: element Comprobante: Schemas validity error : Element '{http://www.sat.gob.mx/cfd/3}Comprobante', attribute 'formaDePago': The attribute 'formaDePago' is not allowed.
005155.xml:6: element Comprobante: Schemas validity error : Element '{http://www.sat.gob.mx/cfd/3}Comprobante', attribute 'metodoDePago': The attribute 'metodoDePago' is not allowed.
005155.xml:6: element Comprobante: Schemas validity error : Element '{http://www.sat.gob.mx/cfd/3}Comprobante', attribute 'noCertificado': The attribute 'noCertificado' is not allowed.
005155.xml:6: element Comprobante: Schemas validity error : Element '{http://www.sat.gob.mx/cfd/3}Comprobante', attribute 'subTotal': The attribute 'subTotal' is not allowed.
005155.xml:6: element Comprobante: Schemas validity error : Element '{http://www.sat.gob.mx/cfd/3}Comprobante', attribute 'descuento': The attribute 'descuento' is not allowed.
005155.xml:6: element Comprobante: Schemas validity error : Element '{http://www.sat.gob.mx/cfd/3}Comprobante', attribute 'total': The attribute 'total' is not allowed.
005155.xml:6: element Comprobante: Schemas validity error : Element '{http://www.sat.gob.mx/cfd/3}Comprobante', attribute 'certificado': The attribute 'certificado' is not allowed.
005155.xml:6: element Comprobante: Schemas validity error : Element '{http://www.sat.gob.mx/cfd/3}Comprobante', attribute 'sello': The attribute 'sello' is not allowed.
005155.xml:6: element Comprobante: Schemas validity error : Element '{http://www.sat.gob.mx/cfd/3}Comprobante': The attribute 'Version' is required but missing.
005155.xml:6: element Comprobante: Schemas validity error : Element '{http://www.sat.gob.mx/cfd/3}Comprobante': The attribute 'Fecha' is required but missing.
005155.xml:6: element Comprobante: Schemas validity error : Element '{http://www.sat.gob.mx/cfd/3}Comprobante': The attribute 'Sello' is required but missing.
005155.xml:6: element Comprobante: Schemas validity error : Element '{http://www.sat.gob.mx/cfd/3}Comprobante': The attribute 'NoCertificado' is required but missing.
005155.xml:6: element Comprobante: Schemas validity error : Element '{http://www.sat.gob.mx/cfd/3}Comprobante': The attribute 'Certificado' is required but missing.
005155.xml:6: element Comprobante: Schemas validity error : Element '{http://www.sat.gob.mx/cfd/3}Comprobante': The attribute 'SubTotal' is required but missing.
005155.xml:6: element Comprobante: Schemas validity error : Element '{http://www.sat.gob.mx/cfd/3}Comprobante': The attribute 'Total' is required but missing.
005155.xml:6: element Comprobante: Schemas validity error : Element '{http://www.sat.gob.mx/cfd/3}Comprobante': The attribute 'TipoDeComprobante' is required but missing.
005155.xml:7: element Emisor: Schemas validity error : Element '{http://www.sat.gob.mx/cfd/3}Emisor', attribute 'rfc': The attribute 'rfc' is not allowed.
005155.xml:7: element Emisor: Schemas validity error : Element '{http://www.sat.gob.mx/cfd/3}Emisor', attribute 'nombre': The attribute 'nombre' is not allowed.
005155.xml:7: element Emisor: Schemas validity error : Element '{http://www.sat.gob.mx/cfd/3}Emisor': The attribute 'Rfc' is required but missing.
005155.xml:7: element Emisor: Schemas validity error : Element '{http://www.sat.gob.mx/cfd/3}Emisor': The attribute 'RegimenFiscal' is required but missing.
005155.xml:7: element Emisor: Schemas validity error : Element '{http://www.sat.gob.mx/cfd/3}Emisor': Character content is not allowed, because the content type is empty.
005155.xml:7: element Emisor: Schemas validity error : Element '{http://www.sat.gob.mx/cfd/3}Emisor': Element content is not allowed, because the content type is empty.
005155.xml:10: element Receptor: Schemas validity error : Element '{http://www.sat.gob.mx/cfd/3}Receptor', attribute 'rfc': The attribute 'rfc' is not allowed.
005155.xml:10: element Receptor: Schemas validity error : Element '{http://www.sat.gob.mx/cfd/3}Receptor', attribute 'nombre': The attribute 'nombre' is not allowed.
005155.xml:10: element Receptor: Schemas validity error : Element '{http://www.sat.gob.mx/cfd/3}Receptor': The attribute 'Rfc' is required but missing.
005155.xml:10: element Receptor: Schemas validity error : Element '{http://www.sat.gob.mx/cfd/3}Receptor': The attribute 'UsoCFDI' is required but missing.
005155.xml:12: element Concepto: Schemas validity error : Element '{http://www.sat.gob.mx/cfd/3}Concepto', attribute 'cantidad': The attribute 'cantidad' is not allowed.
005155.xml:12: element Concepto: Schemas validity error : Element '{http://www.sat.gob.mx/cfd/3}Concepto', attribute 'unidad': The attribute 'unidad' is not allowed.
005155.xml:12: element Concepto: Schemas validity error : Element '{http://www.sat.gob.mx/cfd/3}Concepto', attribute 'descripcion': The attribute 'descripcion' is not allowed.
005155.xml:12: element Concepto: Schemas validity error : Element '{http://www.sat.gob.mx/cfd/3}Concepto', attribute 'valorUnitario': The attribute 'valorUnitario' is not allowed.
005155.xml:12: element Concepto: Schemas validity error : Element '{http://www.sat.gob.mx/cfd/3}Concepto', attribute 'importe': The attribute 'importe' is not allowed.
005155.xml:12: element Concepto: Schemas validity error : Element '{http://www.sat.gob.mx/cfd/3}Concepto': The attribute 'ClaveProdServ' is required but missing.
005155.xml:12: element Concepto: Schemas validity error : Element '{http://www.sat.gob.mx/cfd/3}Concepto': The attribute 'Cantidad' is required but missing.
005155.xml:12: element Concepto: Schemas validity error : Element '{http://www.sat.gob.mx/cfd/3}Concepto': The attribute 'ClaveUnidad' is required but missing.
005155.xml:12: element Concepto: Schemas validity error : Element '{http://www.sat.gob.mx/cfd/3}Concepto': The attribute 'Descripcion' is required but missing.
005155.xml:12: element Concepto: Schemas validity error : Element '{http://www.sat.gob.mx/cfd/3}Concepto': The attribute 'ValorUnitario' is required but missing.
005155.xml:12: element Concepto: Schemas validity error : Element '{http://www.sat.gob.mx/cfd/3}Concepto': The attribute 'Importe' is required but missing.
005155.xml:20: element Nomina: Schemas validity error : Element '{http://www.sat.gob.mx/nomina12}Nomina': No matching global element declaration available, but demanded by the strict wildcard.
005155.xml fails to validate
Adjuntos
005155.xml
(4.63 KiB) Descargado 298 veces

fortiz
Mensajes: 221
Registrado: Vie Dic 10, 2010 8:11 am

Re: Error Schemas validity

Mensajepor fortiz » Vie May 19, 2017 4:51 pm

Por las minúsculas que veo estas generado 3.2 no 3.3, ¿es correcto?

En ese caso usa el cfdv32.xsd

checa mis archivos de aqui https://github.com/fortiz/sat/tree/master/xsd

droid
Mensajes: 40
Registrado: Lun Sep 29, 2014 7:04 am

Re: Error Schemas validity

Mensajepor droid » Lun May 22, 2017 9:43 am

Listo, ya esta funcionando con cfdv32.xsd, tambien modifique mi xml ya que tenia http://www.sat.gob.mx/nomina12 y aun enviaba error, le quite el http://

<nomina12:Nomina xmlns:nomina12="www.sat.gob.mx/nomina12" Version="1.2"



Gracias @fortiz

droid
Mensajes: 40
Registrado: Lun Sep 29, 2014 7:04 am

Re: Error Schemas validity

Mensajepor droid » Lun May 29, 2017 7:50 am

Buen dia,

Respecto al mensaje anterior donde indico que removí el http:// , ahora, sí deseo obtener la cadena original con el comando de linux xsltproc manda mensaje de error, entonces manualmente le agrego el http;// en la misma linea
<nomina12:Nomina xmlns:nomina12="http://www.sat.gob.mx/nomina12"

y con eso si me genera la cadena original.

Como manejan ustedes esta situacion? cual es el URL que debe de llevar?

Gracias de antemano.


Volver a “Otros”

¿Quién está conectado?

Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 2 invitados