Subversion Repositories Integrator Subversion

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
482 blopes 1
<?xml version="1.0" encoding="UTF-8"?>
2
<xs:schema xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.portalfiscal.inf.br/nfe" targetNamespace="http://www.portalfiscal.inf.br/nfe" elementFormDefault="qualified" attributeFormDefault="unqualified">
3
        <xs:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="xmldsig-core-schema_v1.01.xsd"/>
4
        <xs:include schemaLocation="tiposBasico_v1.03.xsd"/>
5
        <xs:complexType name="TEvento">
6
                <xs:annotation>
7
                        <xs:documentation>Tipo Evento</xs:documentation>
8
                </xs:annotation>
9
                <xs:sequence>
10
                        <xs:element name="infEvento">
11
                                <xs:complexType>
12
                                        <xs:sequence>
13
                                                <xs:element name="cOrgao" type="TCOrgaoIBGE">
14
                                                        <xs:annotation>
15
                                                                <xs:documentation>Código do órgão de recepção do Evento. Utilizar a Tabela do IBGE extendida, utilizar 91 para identificar o Ambiente Nacional</xs:documentation>
16
                                                        </xs:annotation>
17
                                                </xs:element>
18
                                                <xs:element name="tpAmb" type="TAmb">
19
                                                        <xs:annotation>
20
                                                                <xs:documentation>Identificação do Ambiente:
21
1 - Produção
22
2 - Homologação</xs:documentation>
23
                                                        </xs:annotation>
24
                                                </xs:element>
25
                                                <xs:choice>
26
                                                        <xs:annotation>
27
                                                                <xs:documentation>Identificação do  autor do evento</xs:documentation>
28
                                                        </xs:annotation>
29
                                                        <xs:element name="CNPJ" type="TCnpjOpc">
30
                                                                <xs:annotation>
31
                                                                        <xs:documentation>CNPJ</xs:documentation>
32
                                                                </xs:annotation>
33
                                                        </xs:element>
34
                                                        <xs:element name="CPF" type="TCpf">
35
                                                                <xs:annotation>
36
                                                                        <xs:documentation>CPF</xs:documentation>
37
                                                                </xs:annotation>
38
                                                        </xs:element>
39
                                                </xs:choice>
40
                                                <xs:element name="chNFe" type="TChNFe">
41
                                                        <xs:annotation>
42
                                                                <xs:documentation>Chave de Acesso da NF-e vinculada ao evento</xs:documentation>
43
                                                        </xs:annotation>
44
                                                </xs:element>
45
                                                <xs:element name="dhEvento" type="TDateTimeUTC">
46
                                                        <xs:annotation>
47
                                                                <xs:documentation>Data e Hora do Evento, formato UTC (AAAA-MM-DDThh:mm:ssTZD, onde TZD = +hh:mm ou -hh:mm)</xs:documentation>
48
                                                        </xs:annotation>
49
                                                </xs:element>
50
                                                <xs:element name="tpEvento">
51
                                                        <xs:annotation>
52
                                                                <xs:documentation>Tipo do Evento</xs:documentation>
53
                                                        </xs:annotation>
54
                                                        <xs:simpleType>
55
                                                                <xs:restriction base="xs:string">
56
                                                                        <xs:whiteSpace value="preserve"/>
57
                                                                        <xs:pattern value="[0-9]{6}"/>
58
                                                                        <xs:enumeration value="110140"/>
59
                                                                </xs:restriction>
60
                                                        </xs:simpleType>
61
                                                </xs:element>
62
                                                <xs:element name="nSeqEvento">
63
                                                        <xs:annotation>
64
                                                                <xs:documentation>Seqüencial do evento para o mesmo tipo de evento.</xs:documentation>
65
                                                        </xs:annotation>
66
                                                        <xs:simpleType>
67
                                                                <xs:restriction base="xs:string">
68
                                                                        <xs:whiteSpace value="preserve"/>
69
                                                                        <xs:pattern value="[1-9]|[1][0-9]{0,1}|20"/>
70
                                                                </xs:restriction>
71
                                                        </xs:simpleType>
72
                                                </xs:element>
73
                                                <xs:element name="verEvento">
74
                                                        <xs:annotation>
75
                                                                <xs:documentation>Versão do Tipo do Evento</xs:documentation>
76
                                                        </xs:annotation>
77
                                                        <xs:simpleType>
78
                                                                <xs:restriction base="xs:string">
79
                                                                        <xs:whiteSpace value="preserve"/>
80
                                                                        <xs:enumeration value="1.00"/>
81
                                                                </xs:restriction>
82
                                                        </xs:simpleType>
83
                                                </xs:element>
84
                                                <xs:element name="detEvento">
85
                                                        <xs:annotation>
86
                                                                <xs:documentation>Schema XML de validação do evento de emissão prévia em contingência - 110140</xs:documentation>
87
                                                        </xs:annotation>
88
                                                        <xs:complexType>
89
                                                                <xs:sequence>
90
                                                                        <xs:element ref="descEvento"/>
91
                                                                        <xs:element ref="cOrgaoAutor"/>
92
                                                                        <xs:element ref="tpAutor"/>
93
                                                                        <xs:element ref="verAplic"/>
94
                                                                        <xs:element ref="dhEmi"/>
95
                                                                        <xs:element ref="tpNF"/>
96
                                                                        <xs:element ref="IE"/>
97
                                                                        <xs:element name="dest">
98
                                                                                <xs:complexType>
99
                                                                                        <xs:sequence>
100
                                                                                                <xs:element ref="UF"/>
101
                                                                                                <xs:choice>
102
                                                                                                        <xs:element name="CNPJ" type="TCnpj"/>
103
                                                                                                        <xs:element name="CPF" type="TCpf"/>
104
                                                                                                        <xs:element name="idEstrangeiro">
105
                                                                                                                <xs:annotation>
106
                                                                                                                        <xs:documentation>Identificador do destinatário, em caso de comprador estrangeiro</xs:documentation>
107
                                                                                                                </xs:annotation>
108
                                                                                                                <xs:simpleType>
109
                                                                                                                        <xs:restriction base="xs:string">
110
                                                                                                                                <xs:whiteSpace value="preserve"/>
111
                                                                                                                                <xs:pattern value="([!-ÿ]{0}|[!-ÿ]{5,20})?"/>
112
                                                                                                                        </xs:restriction>
113
                                                                                                                </xs:simpleType>
114
                                                                                                        </xs:element>
115
                                                                                                </xs:choice>
116
                                                                                                <xs:element ref="IE" minOccurs="0"/>
117
                                                                                                <xs:element ref="vNF"/>
118
                                                                                                <xs:element ref="vICMS"/>
119
                                                                                                <xs:element ref="vST"/>
120
                                                                                        </xs:sequence>
121
                                                                                </xs:complexType>
122
                                                                        </xs:element>
123
                                                                </xs:sequence>
124
                                                                <xs:attribute name="versao" use="required">
125
                                                                        <xs:simpleType>
126
                                                                                <xs:restriction base="xs:string">
127
                                                                                        <xs:whiteSpace value="preserve"/>
128
                                                                                        <xs:enumeration value="1.00"/>
129
                                                                                </xs:restriction>
130
                                                                        </xs:simpleType>
131
                                                                </xs:attribute>
132
                                                        </xs:complexType>
133
                                                </xs:element>
134
                                        </xs:sequence>
135
                                        <xs:attribute name="Id" use="required">
136
                                                <xs:annotation>
137
                                                        <xs:documentation>Identificador da TAG a ser assinada, a regra de formação do Id é:
138
“ID” + tpEvento +  chave da NF-e + nSeqEvento</xs:documentation>
139
                                                </xs:annotation>
140
                                                <xs:simpleType>
141
                                                        <xs:restriction base="xs:ID">
142
                                                                <xs:pattern value="ID[0-9]{52}"/>
143
                                                        </xs:restriction>
144
                                                </xs:simpleType>
145
                                        </xs:attribute>
146
                                </xs:complexType>
147
                        </xs:element>
148
                        <xs:element ref="ds:Signature"/>
149
                </xs:sequence>
150
                <xs:attribute name="versao" type="TVerEvento" use="required"/>
151
        </xs:complexType>
152
        <xs:element name="descEvento">
153
                <xs:simpleType>
154
                        <xs:restriction base="xs:string">
155
                                <xs:whiteSpace value="preserve"/>
156
                                <xs:enumeration value="EPEC"/>
157
                        </xs:restriction>
158
                </xs:simpleType>
159
        </xs:element>
160
        <xs:element name="tpAutor">
161
                <xs:annotation>
162
                        <xs:documentation>Neste evento, aceitar apenas 1. 1=Empresa Emitente; 2=Empresa Destinatária; 3=Empresa; 5=Fisco; 6=RFB; 9=Outros Órgãos</xs:documentation>
163
                </xs:annotation>
164
                <xs:simpleType>
165
                        <xs:restriction base="xs:string">
166
                                <xs:whiteSpace value="preserve"/>
167
                                <xs:enumeration value="1"/>
168
                        </xs:restriction>
169
                </xs:simpleType>
170
        </xs:element>
171
        <xs:element name="verAplic" type="TVerAplic">
172
                <xs:annotation>
173
                        <xs:documentation>Versão do Aplicativo do Autor do Evento</xs:documentation>
174
                </xs:annotation>
175
        </xs:element>
176
        <xs:element name="dhEmi" type="TDateTimeUTC">
177
                <xs:annotation>
178
                        <xs:documentation>Data de emissão no formato UTC.  AAAA-MM-DDThh:mm:ssTZD</xs:documentation>
179
                </xs:annotation>
180
        </xs:element>
181
        <xs:element name="tpNF">
182
                <xs:annotation>
183
                        <xs:documentation>Tipo do Documento Fiscal (0 - entrada; 1 - saída)</xs:documentation>
184
                </xs:annotation>
185
                <xs:simpleType>
186
                        <xs:restriction base="xs:string">
187
                                <xs:whiteSpace value="preserve"/>
188
                                <xs:enumeration value="0"/>
189
                                <xs:enumeration value="1"/>
190
                        </xs:restriction>
191
                </xs:simpleType>
192
        </xs:element>
193
        <xs:element name="cOrgaoAutor" type="TCodUfIBGE"/>
194
        <xs:element name="IE">
195
                <xs:annotation>
196
                        <xs:documentation>Informar a IE. Para IE do destinatário somente quando o contribuinte possuir uma inscrição estadual</xs:documentation>
197
                </xs:annotation>
198
                <xs:simpleType>
199
                        <xs:restriction base="xs:string">
200
                                <xs:whiteSpace value="preserve"/>
201
                                <xs:pattern value="[0-9]{2,14}"/>
202
                        </xs:restriction>
203
                </xs:simpleType>
204
        </xs:element>
205
        <xs:element name="UF" type="TUf">
206
                <xs:annotation>
207
                        <xs:documentation>Sigla UF do destinatário. Informar "EX" no caso de operação com o exterior</xs:documentation>
208
                </xs:annotation>
209
        </xs:element>
210
        <xs:element name="vNF" type="TDec_1302">
211
                <xs:annotation>
212
                        <xs:documentation>Valor total da NF-e</xs:documentation>
213
                </xs:annotation>
214
        </xs:element>
215
        <xs:element name="vICMS" type="TDec_1302">
216
                <xs:annotation>
217
                        <xs:documentation>Valor total do ICMS</xs:documentation>
218
                </xs:annotation>
219
        </xs:element>
220
        <xs:element name="vST" type="TDec_1302">
221
                <xs:annotation>
222
                        <xs:documentation>Valor total do ICMS de Substituição Tributária</xs:documentation>
223
                </xs:annotation>
224
        </xs:element>
225
        <xs:complexType name="TRetEvento">
226
                <xs:annotation>
227
                        <xs:documentation>Tipo retorno do Evento</xs:documentation>
228
                </xs:annotation>
229
                <xs:sequence>
230
                        <xs:element name="infEvento">
231
                                <xs:complexType>
232
                                        <xs:sequence>
233
                                                <xs:element name="tpAmb" type="TAmb">
234
                                                        <xs:annotation>
235
                                                                <xs:documentation>Identificação do Ambiente:
236
1 - Produção
237
2 - Homologação</xs:documentation>
238
                                                        </xs:annotation>
239
                                                </xs:element>
240
                                                <xs:element name="verAplic" type="TVerAplic">
241
                                                        <xs:annotation>
242
                                                                <xs:documentation>Versão do Aplicativo que recebeu o Evento</xs:documentation>
243
                                                        </xs:annotation>
244
                                                </xs:element>
245
                                                <xs:element name="cOrgao" type="TCOrgaoIBGE">
246
                                                        <xs:annotation>
247
                                                                <xs:documentation>Código do órgão de recepção do Evento. Utilizar a Tabela do IBGE extendida, utilizar 91 para identificar o Ambiente Nacional</xs:documentation>
248
                                                        </xs:annotation>
249
                                                </xs:element>
250
                                                <xs:element name="cStat" type="TStat">
251
                                                        <xs:annotation>
252
                                                                <xs:documentation>Código do status da registro do Evento</xs:documentation>
253
                                                        </xs:annotation>
254
                                                </xs:element>
255
                                                <xs:element name="xMotivo" type="TMotivo">
256
                                                        <xs:annotation>
257
                                                                <xs:documentation>Descrição literal do status do registro do Evento</xs:documentation>
258
                                                        </xs:annotation>
259
                                                </xs:element>
260
                                                <xs:element name="chNFe" type="TChNFe" minOccurs="0">
261
                                                        <xs:annotation>
262
                                                                <xs:documentation>Chave de Acesso NF-e vinculada</xs:documentation>
263
                                                        </xs:annotation>
264
                                                </xs:element>
265
                                                <xs:element name="tpEvento" minOccurs="0">
266
                                                        <xs:annotation>
267
                                                                <xs:documentation>Tipo do Evento vinculado</xs:documentation>
268
                                                        </xs:annotation>
269
                                                        <xs:simpleType>
270
                                                                <xs:restriction base="xs:string">
271
                                                                        <xs:whiteSpace value="preserve"/>
272
                                                                        <xs:pattern value="[0-9]{6}"/>
273
                                                                </xs:restriction>
274
                                                        </xs:simpleType>
275
                                                </xs:element>
276
                                                <xs:element name="xEvento" minOccurs="0">
277
                                                        <xs:annotation>
278
                                                                <xs:documentation>Descrição do Evento</xs:documentation>
279
                                                        </xs:annotation>
280
                                                        <xs:simpleType>
281
                                                                <xs:restriction base="TString">
282
                                                                        <xs:minLength value="5"/>
283
                                                                        <xs:maxLength value="60"/>
284
                                                                </xs:restriction>
285
                                                        </xs:simpleType>
286
                                                </xs:element>
287
                                                <xs:element name="nSeqEvento" minOccurs="0">
288
                                                        <xs:annotation>
289
                                                                <xs:documentation>Seqüencial do evento</xs:documentation>
290
                                                        </xs:annotation>
291
                                                        <xs:simpleType>
292
                                                                <xs:restriction base="xs:string">
293
                                                                        <xs:whiteSpace value="preserve"/>
294
                                                                        <xs:pattern value="[1-9][0-9]{0,1}"/>
295
                                                                </xs:restriction>
296
                                                        </xs:simpleType>
297
                                                </xs:element>
298
                                                <xs:element ref="cOrgaoAutor"/>
299
                                                <xs:element name="dhRegEvento">
300
                                                        <xs:annotation>
301
                                                                <xs:documentation>Data e Hora de do recebimento do evento ou do registro do evento formato UTC AAAA-MM-DDThh:mm:ssTZD.</xs:documentation>
302
                                                        </xs:annotation>
303
                                                        <xs:simpleType>
304
                                                                <xs:restriction base="xs:string">
305
                                                                        <xs:whiteSpace value="preserve"/>
306
                                                                        <xs:pattern value="(((20(([02468][048])|([13579][26]))-02-29))|(20[0-9][0-9])-((((0[1-9])|(1[0-2]))-((0[1-9])|(1\d)|(2[0-8])))|((((0[13578])|(1[02]))-31)|(((0[1,3-9])|(1[0-2]))-(29|30)))))T(20|21|22|23|[0-1]\d):[0-5]\d:[0-5]\d[\-,\+](0[0-9]|10|11|12):00"/>
307
                                                                </xs:restriction>
308
                                                        </xs:simpleType>
309
                                                </xs:element>
310
                                                <xs:element name="nProt" type="TProt" minOccurs="0">
311
                                                        <xs:annotation>
312
                                                                <xs:documentation>Número do protocolo de registro do evento</xs:documentation>
313
                                                        </xs:annotation>
314
                                                </xs:element>
315
                                                <xs:element name="chNFePend" type="TChNFe" minOccurs="0" maxOccurs="50">
316
                                                        <xs:annotation>
317
                                                                <xs:documentation>Relação de Chaves de Acesso de EPEC não conciliados (pendentes de conciliação) existentes no AN.</xs:documentation>
318
                                                        </xs:annotation>
319
                                                </xs:element>
320
                                        </xs:sequence>
321
                                        <xs:attribute name="Id" use="optional">
322
                                                <xs:simpleType>
323
                                                        <xs:restriction base="xs:ID">
324
                                                                <xs:pattern value="ID[0-9]{15}"/>
325
                                                        </xs:restriction>
326
                                                </xs:simpleType>
327
                                        </xs:attribute>
328
                                </xs:complexType>
329
                        </xs:element>
330
                        <xs:element ref="ds:Signature" minOccurs="0"/>
331
                </xs:sequence>
332
                <xs:attribute name="versao" type="TVerEvento" use="required"/>
333
        </xs:complexType>
334
        <xs:complexType name="TEnvEvento">
335
                <xs:annotation>
336
                        <xs:documentation>Tipo Lote de Envio</xs:documentation>
337
                </xs:annotation>
338
                <xs:sequence>
339
                        <xs:element name="idLote">
340
                                <xs:simpleType>
341
                                        <xs:restriction base="xs:string">
342
                                                <xs:whiteSpace value="preserve"/>
343
                                                <xs:pattern value="[0-9]{1,15}"/>
344
                                        </xs:restriction>
345
                                </xs:simpleType>
346
                        </xs:element>
347
                        <xs:element name="evento" type="TEvento" maxOccurs="20"/>
348
                </xs:sequence>
349
                <xs:attribute name="versao" type="TVerEnvEvento" use="required"/>
350
        </xs:complexType>
351
        <xs:complexType name="TRetEnvEvento">
352
                <xs:annotation>
353
                        <xs:documentation> Tipo Retorno de Lote de Envio</xs:documentation>
354
                </xs:annotation>
355
                <xs:sequence>
356
                        <xs:element name="idLote">
357
                                <xs:simpleType>
358
                                        <xs:restriction base="xs:string">
359
                                                <xs:whiteSpace value="preserve"/>
360
                                                <xs:pattern value="[0-9]{1,15}"/>
361
                                        </xs:restriction>
362
                                </xs:simpleType>
363
                        </xs:element>
364
                        <xs:element name="tpAmb" type="TAmb">
365
                                <xs:annotation>
366
                                        <xs:documentation>Identificação do Ambiente:
367
1 - Produção
368
2 - Homologação</xs:documentation>
369
                                </xs:annotation>
370
                        </xs:element>
371
                        <xs:element name="verAplic" type="TVerAplic">
372
                                <xs:annotation>
373
                                        <xs:documentation>Versão do Aplicativo que recebeu o Evento</xs:documentation>
374
                                </xs:annotation>
375
                        </xs:element>
376
                        <xs:element name="cOrgao" type="TCOrgaoIBGE">
377
                                <xs:annotation>
378
                                        <xs:documentation>Código do òrgao que registrou o Evento</xs:documentation>
379
                                </xs:annotation>
380
                        </xs:element>
381
                        <xs:element name="cStat" type="TStat">
382
                                <xs:annotation>
383
                                        <xs:documentation>Código do status da registro do Evento</xs:documentation>
384
                                </xs:annotation>
385
                        </xs:element>
386
                        <xs:element name="xMotivo" type="TMotivo">
387
                                <xs:annotation>
388
                                        <xs:documentation>Descrição literal do status do registro do Evento</xs:documentation>
389
                                </xs:annotation>
390
                        </xs:element>
391
                        <xs:element name="retEvento" type="TRetEvento" minOccurs="0" maxOccurs="20"/>
392
                </xs:sequence>
393
                <xs:attribute name="versao" type="TVerEnvEvento" use="required"/>
394
        </xs:complexType>
395
        <xs:complexType name="TProcEvento">
396
                <xs:annotation>
397
                        <xs:documentation>Tipo procEvento</xs:documentation>
398
                </xs:annotation>
399
                <xs:sequence>
400
                        <xs:element name="evento" type="TEvento"/>
401
                        <xs:element name="retEvento" type="TRetEvento"/>
402
                </xs:sequence>
403
                <xs:attribute name="versao" type="TVerEvento" use="required"/>
404
        </xs:complexType>
405
        <xs:simpleType name="TVerEnvEvento">
406
                <xs:annotation>
407
                        <xs:documentation>Tipo Versão do EnvEvento</xs:documentation>
408
                </xs:annotation>
409
                <xs:restriction base="xs:string">
410
                        <xs:whiteSpace value="preserve"/>
411
                        <xs:pattern value="1\.00"/>
412
                </xs:restriction>
413
        </xs:simpleType>
414
        <xs:simpleType name="TVerEvento">
415
                <xs:annotation>
416
                        <xs:documentation>Tipo Versão do Evento</xs:documentation>
417
                </xs:annotation>
418
                <xs:restriction base="xs:string">
419
                        <xs:whiteSpace value="preserve"/>
420
                        <xs:pattern value="1\.00"/>
421
                </xs:restriction>
422
        </xs:simpleType>
423
</xs:schema>