Erro validação XML

5,435 views
Skip to first unread message

Edilson Belluomini

unread,
Mar 29, 2012, 2:17:10 PM3/29/12
to NFePHP
Seu que existem posts anteriores a respeito, mas não descobri nenhum
que resolvesse o problema.

Estou recebendo a mensagem:

Erro 1839: Element '{http://www.portalfiscal.inf.br/nfe}IE': [facet
'pattern'] The value '' is not accepted by the pattern 'ISENTO|[0-9]
{0,14}'. ; Erro 1824: Element '{http://www.portalfiscal.inf.br/nfe}
IE': '' is not a valid value of the atomic type '{http://
www.portalfiscal.inf.br/nfe}TIeDest'. ;

A NF em questão é para uma pessoa fisica, e a tag IE esta vazia.

No arquivo schemes/PL_006j/tiposBasico_v1.03.xsd estou usando:

<xs:pattern value="ISENTO|[0-9]{0,14}"/>

Se transfiro a palavra "ISENTO" para o final ( [0-9]{0,14}|ISENTO ),
esta nota passa na validação, mas notas de clientes com a inscrição
ISENTO não passam, e ai tenho que voltar na situação inicial

Alguem teria uma solução definitiva ?

Osmar Junior

unread,
Mar 29, 2012, 3:32:06 PM3/29/12
to nfe...@googlegroups.com
 

 
[...]O terra, terra, terra! Ouve a palavra do SENHOR. — Jeremias 22:29




Edilson Belluomini

unread,
Mar 29, 2012, 3:42:24 PM3/29/12
to NFePHP
Obrigado

Funcionou.


On 29 mar, 16:32, Osmar Junior <clip.magn...@gmail.com> wrote:
> ta ai:http://www.assembla.com/spaces/nfephp/wiki/Falha_de_Valida%C3%A7%C3%A...
>
> [...]O terra, terra, terra! Ouve a palavra do SENHOR. — Jeremias 22:29http://techjunior.wordpress.com/
>
> Em 29 de março de 2012 15:17, Edilson Belluomini <
> edilson.belluom...@gmail.com> escreveu:
>
>
>
>
>
>
>
> > Seu que existem posts anteriores a respeito, mas não descobri nenhum
> > que resolvesse o problema.
>
> > Estou recebendo a mensagem:
>
> > Erro 1839: Element '{http://www.portalfiscal.inf.br/nfe}IE': [facet
> > 'pattern'] The value '' is not accepted by the pattern 'ISENTO|[0-9]
> > {0,14}'. ; Erro 1824: Element '{http://www.portalfiscal.inf.br/nfe}
> > IE': '' is not a valid value of the atomic type '{http://
> >www.portalfiscal.inf.br/nfe}TIeDest<http://www.portalfiscal.inf.br/nfe%7DTIeDest>'.

Roberto Leite Machado

unread,
Mar 29, 2012, 4:24:09 PM3/29/12
to nfe...@googlegroups.com
Sim !!

A validação pelo XSD contêm "expressões regulares" que não são bem tratadas pelo PHP e portanto devem ser alteradas no próprio xsd 
Existem comentários no grupo sobre isso

Roberto 




--
___________________________________________
Roberto
Nisi utile est quod facimus, stulta est gloria (Julius Phaedous)

tiago costa costa

unread,
Mar 30, 2012, 12:47:13 PM3/30/12
to NFePHP
Pessoal o meu xml está sendo validado porem ele ta trazendo os erros e
já verifiquei o XML porem todos os campos já estão prenchidos conforme
o erro está solicitando :

erros :
Erro 1831: Element '{http://www.portalfiscal.inf.br/nfe}nro': [facet
'minLength'] The value has a length of '0'; this underruns the allowed
minimum length of '1'.
; Erro 1839: Element '{http://www.portalfiscal.inf.br/nfe}nro': [facet
'pattern'] The value '' is not accepted by the pattern '[!-ÿ]{1}[ -
ÿ]*[!-ÿ]{1}|[!-ÿ]{1}'.
; Erro 1824: Element '{http://www.portalfiscal.inf.br/nfe}nro': '' is
not a valid value of the local atomic type.
; Erro 1839: Element '{http://www.portalfiscal.inf.br/nfe}vUnCom':
[facet 'pattern'] The value '' is not accepted by the pattern '0|0\.
[0-9]{1,10}|[1-9]{1}[0-9]{0,10}|[1-9]{1}[0-9]{0,10}(\.[0-9]{1,10})?'.
; Erro 1824: Element '{http://www.portalfiscal.inf.br/nfe}vUnCom': ''
is not a valid value of the atomic type '{http://
www.portalfiscal.inf.br/nfe}TDec_1110'.
; Erro 1840: Element '{http://www.portalfiscal.inf.br/nfe}CSOSN':
[facet 'enumeration'] The value '' is not an element of the set
{'101'}.
; Erro 1824: Element '{http://www.portalfiscal.inf.br/nfe}CSOSN': ''
is not a valid value of the local atomic type.
; Erro 1840: Element '{http://www.portalfiscal.inf.br/nfe}CST': [facet
'enumeration'] The value '' is not an element of the set {'04', '06',
'07', '08', '09'}.
; Erro 1824: Element '{http://www.portalfiscal.inf.br/nfe}CST': '' is
not a valid value of the local atomic type.
; Erro 1840: Element '{http://www.portalfiscal.inf.br/nfe}CST': [facet
'enumeration'] The value '' is not an element of the set {'04', '06',
'07', '08', '09'}.
; Erro 1824: Element '{http://www.portalfiscal.inf.br/nfe}CST': '' is
not a valid value of the local atomic type.
; Erro 1871: Element '{http://www.portalfiscal.inf.br/nfe}vNF': This
element is not expected. Expected is ( {http://www.portalfiscal.inf.br/
nfe}vOutro ).
; Erro 1840: Element '{http://www.portalfiscal.inf.br/nfe}modFrete':
[facet 'enumeration'] The value 'destinatario' is not an element of
the set {'0', '1', '2', '9'}.
; Erro 1824: Element '{http://www.portalfiscal.inf.br/nfe}modFrete':
'destinatario' is not a valid value of the local atomic type.
; Erro 1840: Element '{http://www.portalfiscal.inf.br/nfe}UF': [facet
'enumeration'] The value 'Distrito Federal - DF' is not an element of
the set {'AC', 'AL', 'AM', 'AP', 'BA', 'CE', 'DF', 'ES', 'GO', 'MA',
'MG', 'MS', 'MT', 'PA', 'PB', 'PE', 'PI', 'PR', 'RJ', 'RN', 'RO',
'RR', 'RS', 'SC', 'SE', 'SP', 'TO', 'EX'}.
; Erro 1824: Element '{http://www.portalfiscal.inf.br/nfe}UF':
'Distrito Federal - DF' is not a valid value of the atomic type
'{http://www.portalfiscal.inf.br/nfe}TUf'.
; Erro 1840: Element '{http://www.portalfiscal.inf.br/nfe}UF': [facet
'enumeration'] The value 'Distrito Federal - DF' is not an element of
the set {'AC', 'AL', 'AM', 'AP', 'BA', 'CE', 'DF', 'ES', 'GO', 'MA',
'MG', 'MS', 'MT', 'PA', 'PB', 'PE', 'PI', 'PR', 'RJ', 'RN', 'RO',
'RR', 'RS', 'SC', 'SE', 'SP', 'TO', 'EX'}.
; Erro 1824: Element '{http://www.portalfiscal.inf.br/nfe}UF':
'Distrito Federal - DF' is not a valid value of the atomic type
'{http://www.portalfiscal.inf.br/nfe}TUf'.
; Erro Fatal 4: Start tag expected, '<' not found


Abraço.

On 29 mar, 17:24, Roberto Leite Machado
<roberto.mach...@superig.com.br> wrote:
> Sim !!
>
> A validação pelo XSD contêm "expressões regulares" que não são bem tratadas
> pelo PHP e portanto devem ser alteradas no próprio xsd
> Existem comentários no grupo sobre isso
>
> Roberto
>
> Em 29 de março de 2012 15:17, Edilson Belluomini <
> edilson.belluom...@gmail.com> escreveu:
>
>
>
>
>
>
>
>
>
> > Seu que existem posts anteriores a respeito, mas não descobri nenhum
> > que resolvesse o problema.
>
> > Estou recebendo a mensagem:
>
> > Erro 1839: Element '{http://www.portalfiscal.inf.br/nfe}IE': [facet
> > 'pattern'] The value '' is not accepted by the pattern 'ISENTO|[0-9]
> > {0,14}'. ; Erro 1824: Element '{http://www.portalfiscal.inf.br/nfe}
> > IE': '' is not a valid value of the atomic type '{http://
> >www.portalfiscal.inf.br/nfe}TIeDest<http://www.portalfiscal.inf.br/nfe%7DTIeDest>'.
> > ;
>
> > A NF em questão é para uma pessoa fisica, e a tag IE esta vazia.
>
> > No arquivo schemes/PL_006j/tiposBasico_v1.03.xsd estou usando:
>
> > <xs:pattern value="ISENTO|[0-9]{0,14}"/>
>
> > Se transfiro a palavra "ISENTO" para o final ( [0-9]{0,14}|ISENTO ),
> > esta nota passa na validação, mas notas de clientes com a inscrição
> > ISENTO não passam, e ai tenho que voltar na situação inicial
>
> > Alguem teria uma solução definitiva ?
>
> > --
> > Você recebeu esta mensagem porque está inscrito no Grupo "NFePHP".
> > Para Postar: nfe...@googlegroups.com
> > Para Sair do Grupo: nfephp+un...@googlegroups.com
> > Link:http://groups.google.com.br/group/nfephp?hl=pt-BR
> > -------
> > FAQ:https://www.assembla.com/wiki/show/nfephp/FAQ
> > Como Participar:https://www.assembla.com/wiki/show/nfephp/Como_participar
> > Como Utilizar:http://www.assembla.com/wiki/show/nfephp/Como_utilizar
>
> --
> ___________________________________________
> Roberto
> *Nisi utile est quod facimus, stulta est gloria (*Julius Phaedous*)*

Roberto Leite Machado

unread,
Mar 30, 2012, 2:02:19 PM3/30/12
to nfe...@googlegroups.com
Tiago;

Preste atenção na informação ...

Não pode estar escrito "Distrito Federal - DF" é só "DF"

Roberto

Nisi utile est quod facimus, stulta est gloria (Julius Phaedous)

Reply all
Reply to author
Forward
0 new messages