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 90 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:
53
210200 - Confirmacao da Operação
54
210210 – Ciência da Operação
55
210220 - Deconhecimento da operacao
56
210240 - Operação não Realizada</xs:documentation>
57
                                                        </xs:annotation>
58
                                                        <xs:simpleType>
59
                                                                <xs:restriction base="xs:string">
60
                                                                        <xs:whiteSpace value="preserve"/>
61
                                                                        <xs:pattern value="[0-9]{6}"/>
62
                                                                        <xs:enumeration value="210200"/>
63
                                                                        <xs:enumeration value="210210"/>
64
                                                                        <xs:enumeration value="210220"/>
65
                                                                        <xs:enumeration value="210240"/>
66
                                                                </xs:restriction>
67
                                                        </xs:simpleType>
68
                                                </xs:element>
69
                                                <xs:element name="nSeqEvento">
70
                                                        <xs:annotation>
71
                                                                <xs:documentation>Seqüencial do evento para o mesmo tipo de evento.  Para maioria dos eventos será 1, nos casos em que possa existir mais de um evento, como é o caso da carta de correção, o autor do evento deve numerar de forma seqüencial.</xs:documentation>
72
                                                        </xs:annotation>
73
                                                        <xs:simpleType>
74
                                                                <xs:restriction base="xs:string">
75
                                                                        <xs:whiteSpace value="preserve"/>
76
                                                                        <xs:pattern value="[0-9]{1,2}"/>
77
                                                                </xs:restriction>
78
                                                        </xs:simpleType>
79
                                                </xs:element>
80
                                                <xs:element name="verEvento" type="TVerEnvEvento">
81
                                                        <xs:annotation>
82
                                                                <xs:documentation>Versão do Tipo do Evento</xs:documentation>
83
                                                        </xs:annotation>
84
                                                </xs:element>
85
                                                <xs:element name="detEvento">
86
                                                        <xs:annotation>
87
                                                                <xs:documentation>Evento da confirmação de recebimento e210200</xs:documentation>
88
                                                        </xs:annotation>
89
                                                        <xs:complexType>
90
                                                                <xs:sequence>
91
                                                                        <xs:element name="descEvento">
92
                                                                                <xs:annotation>
93
                                                                                        <xs:documentation>Descrição do Evento:
94
                                                                                         "Confirmacao da Operacao"
95
                                                                                         "Ciencia da Operacao"
96
                                                                                         "Desconhecimento da Operacao"
97
                                                                                         "Operação não Realizada"</xs:documentation>
98
                                                                                </xs:annotation>
99
                                                                                <xs:simpleType>
100
                                                                                        <xs:restriction base="xs:string">
101
                                                                                                <xs:whiteSpace value="preserve"/>
102
                                                                                                <xs:enumeration value="Confirmacao da Operacao"/>
103
                                                                                                <xs:enumeration value="Ciencia da Operacao"/>
104
                                                                                                <xs:enumeration value="Desconhecimento da Operacao"/>
105
                                                                                                <xs:enumeration value="Operacao nao Realizada"/>
106
                                                                                        </xs:restriction>
107
                                                                                </xs:simpleType>
108
                                                                        </xs:element>
109
                                                                        <xs:element name="xJust" minOccurs="0">
110
                                                                                <xs:annotation>
111
                                                                                        <xs:documentation>Justificativa de Operação não Realizada</xs:documentation>
112
                                                                                </xs:annotation>
113
                                                                                <xs:simpleType>
114
                                                                                        <xs:restriction base="xs:string">
115
                                                                                                <xs:whiteSpace value="preserve"/>
116
                                                                                                <xs:minLength value="15"/>
117
                                                                                                <xs:maxLength value="255"/>
118
                                                                                                <xs:pattern value="[!-ÿ]{1}[ -ÿ]{0,}[!-ÿ]{1}|[!-ÿ]{1}"/>
119
                                                                                        </xs:restriction>
120
                                                                                </xs:simpleType>
121
                                                                        </xs:element>
122
                                                                </xs:sequence>
123
                                                                <xs:attribute name="versao" use="required">
124
                                                                        <xs:simpleType>
125
                                                                                <xs:restriction base="xs:string">
126
                                                                                        <xs:whiteSpace value="preserve"/>
127
                                                                                        <xs:enumeration value="1.00"/>
128
                                                                                </xs:restriction>
129
                                                                        </xs:simpleType>
130
                                                                </xs:attribute>
131
                                                        </xs:complexType>
132
                                                </xs:element>
133
                                        </xs:sequence>
134
                                        <xs:attribute name="Id" use="required">
135
                                                <xs:annotation>
136
                                                        <xs:documentation>Identificador da TAG a ser assinada, a regra de formação do Id é:
137
“ID” + tpEvento +  chave da NF-e + nSeqEvento</xs:documentation>
138
                                                </xs:annotation>
139
                                                <xs:simpleType>
140
                                                        <xs:restriction base="xs:ID">
141
                                                                <xs:pattern value="ID[0-9]{52}"/>
142
                                                        </xs:restriction>
143
                                                </xs:simpleType>
144
                                        </xs:attribute>
145
                                </xs:complexType>
146
                        </xs:element>
147
                        <xs:element ref="ds:Signature"/>
148
                </xs:sequence>
149
                <xs:attribute name="versao" type="TVerEvento" use="required"/>
150
        </xs:complexType>
151
        <xs:complexType name="TretEvento">
152
                <xs:annotation>
153
                        <xs:documentation>Tipo retorno do Evento</xs:documentation>
154
                </xs:annotation>
155
                <xs:sequence>
156
                        <xs:element name="infEvento">
157
                                <xs:complexType>
158
                                        <xs:sequence>
159
                                                <xs:element name="tpAmb" type="TAmb">
160
                                                        <xs:annotation>
161
                                                                <xs:documentation>Identificação do Ambiente:
162
1 - Produção
163
2 - Homologação</xs:documentation>
164
                                                        </xs:annotation>
165
                                                </xs:element>
166
                                                <xs:element name="verAplic" type="TVerAplic">
167
                                                        <xs:annotation>
168
                                                                <xs:documentation>Versão do Aplicativo que recebeu o Evento</xs:documentation>
169
                                                        </xs:annotation>
170
                                                </xs:element>
171
                                                <xs:element name="cOrgao" type="TCOrgaoIBGE">
172
                                                        <xs:annotation>
173
                                                                <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>
174
                                                        </xs:annotation>
175
                                                </xs:element>
176
                                                <xs:element name="cStat" type="TStat">
177
                                                        <xs:annotation>
178
                                                                <xs:documentation>Código do status da registro do Evento</xs:documentation>
179
                                                        </xs:annotation>
180
                                                </xs:element>
181
                                                <xs:element name="xMotivo" type="TMotivo">
182
                                                        <xs:annotation>
183
                                                                <xs:documentation>Descrição literal do status do registro do Evento</xs:documentation>
184
                                                        </xs:annotation>
185
                                                </xs:element>
186
                                                <xs:element name="chNFe" type="TChNFe" minOccurs="0">
187
                                                        <xs:annotation>
188
                                                                <xs:documentation>Chave de Acesso NF-e vinculada</xs:documentation>
189
                                                        </xs:annotation>
190
                                                </xs:element>
191
                                                <xs:element name="tpEvento" minOccurs="0">
192
                                                        <xs:annotation>
193
                                                                <xs:documentation>Tipo do Evento vinculado</xs:documentation>
194
                                                        </xs:annotation>
195
                                                        <xs:simpleType>
196
                                                                <xs:restriction base="xs:string">
197
                                                                        <xs:whiteSpace value="preserve"/>
198
                                                                        <xs:pattern value="[0-9]{6}"/>
199
                                                                </xs:restriction>
200
                                                        </xs:simpleType>
201
                                                </xs:element>
202
                                                <xs:element name="xEvento" minOccurs="0">
203
                                                        <xs:annotation>
204
                                                                <xs:documentation>Descrição do Evento</xs:documentation>
205
                                                        </xs:annotation>
206
                                                        <xs:simpleType>
207
                                                                <xs:restriction base="TString">
208
                                                                        <xs:minLength value="5"/>
209
                                                                        <xs:maxLength value="60"/>
210
                                                                </xs:restriction>
211
                                                        </xs:simpleType>
212
                                                </xs:element>
213
                                                <xs:element name="nSeqEvento" minOccurs="0">
214
                                                        <xs:annotation>
215
                                                                <xs:documentation>Seqüencial do evento</xs:documentation>
216
                                                        </xs:annotation>
217
                                                        <xs:simpleType>
218
                                                                <xs:restriction base="xs:string">
219
                                                                        <xs:whiteSpace value="preserve"/>
220
                                                                        <xs:pattern value="[0-9]{1,2}"/>
221
                                                                </xs:restriction>
222
                                                        </xs:simpleType>
223
                                                </xs:element>
224
                                                <xs:choice minOccurs="0">
225
                                                        <xs:annotation>
226
                                                                <xs:documentation>Identificação do  destinatpario da NF-e</xs:documentation>
227
                                                        </xs:annotation>
228
                                                        <xs:element name="CNPJDest" type="TCnpjOpc">
229
                                                                <xs:annotation>
230
                                                                        <xs:documentation>CNPJ Destinatário</xs:documentation>
231
                                                                </xs:annotation>
232
                                                        </xs:element>
233
                                                        <xs:element name="CPFDest" type="TCpf">
234
                                                                <xs:annotation>
235
                                                                        <xs:documentation>CPF Destiantário</xs:documentation>
236
                                                                </xs:annotation>
237
                                                        </xs:element>
238
                                                </xs:choice>
239
                                                <xs:element name="emailDest" minOccurs="0">
240
                                                        <xs:annotation>
241
                                                                <xs:documentation>email do destinatário</xs:documentation>
242
                                                        </xs:annotation>
243
                                                        <xs:simpleType>
244
                                                                <xs:restriction base="TString">
245
                                                                        <xs:minLength value="1"/>
246
                                                                        <xs:maxLength value="60"/>
247
                                                                </xs:restriction>
248
                                                        </xs:simpleType>
249
                                                </xs:element>
250
                                                <xs:element name="dhRegEvento">
251
                                                        <xs:annotation>
252
                                                                <xs:documentation>Data e Hora de do recebimento do evento ou do registro do evento formato UTC AAAA-MM-DDThh:mm:ssTZD.</xs:documentation>
253
                                                        </xs:annotation>
254
                                                        <xs:simpleType>
255
                                                                <xs:restriction base="xs:string">
256
                                                                        <xs:whiteSpace value="preserve"/>
257
                                                                        <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[1-3]:00"/>
258
                                                                </xs:restriction>
259
                                                        </xs:simpleType>
260
                                                </xs:element>
261
                                                <xs:element name="nProt" type="TProt" minOccurs="0">
262
                                                        <xs:annotation>
263
                                                                <xs:documentation>Número do protocolo de registro do evento</xs:documentation>
264
                                                        </xs:annotation>
265
                                                </xs:element>
266
                                        </xs:sequence>
267
                                        <xs:attribute name="Id" use="optional">
268
                                                <xs:simpleType>
269
                                                        <xs:restriction base="xs:ID">
270
                                                                <xs:pattern value="ID[0-9]{15}"/>
271
                                                        </xs:restriction>
272
                                                </xs:simpleType>
273
                                        </xs:attribute>
274
                                </xs:complexType>
275
                        </xs:element>
276
                        <xs:element ref="ds:Signature" minOccurs="0"/>
277
                </xs:sequence>
278
                <xs:attribute name="versao" type="TVerEvento" use="required"/>
279
        </xs:complexType>
280
        <xs:complexType name="TEnvEvento">
281
                <xs:annotation>
282
                        <xs:documentation> Tipo Lote de Envio</xs:documentation>
283
                </xs:annotation>
284
                <xs:sequence>
285
                        <xs:element name="idLote">
286
                                <xs:simpleType>
287
                                        <xs:restriction base="xs:string">
288
                                                <xs:whiteSpace value="preserve"/>
289
                                                <xs:pattern value="[0-9]{1,15}"/>
290
                                        </xs:restriction>
291
                                </xs:simpleType>
292
                        </xs:element>
293
                        <xs:element name="evento" type="TEvento" maxOccurs="20"/>
294
                </xs:sequence>
295
                <xs:attribute name="versao" type="TVerEnvEvento" use="required"/>
296
        </xs:complexType>
297
        <xs:complexType name="TRetEnvEvento">
298
                <xs:annotation>
299
                        <xs:documentation> Tipo Retorno de Lote de Envio</xs:documentation>
300
                </xs:annotation>
301
                <xs:sequence>
302
                        <xs:element name="idLote">
303
                                <xs:simpleType>
304
                                        <xs:restriction base="xs:string">
305
                                                <xs:whiteSpace value="preserve"/>
306
                                                <xs:pattern value="[0-9]{1,15}"/>
307
                                        </xs:restriction>
308
                                </xs:simpleType>
309
                        </xs:element>
310
                        <xs:element name="tpAmb" type="TAmb">
311
                                <xs:annotation>
312
                                        <xs:documentation>Identificação do Ambiente:
313
1 - Produção
314
2 - Homologação</xs:documentation>
315
                                </xs:annotation>
316
                        </xs:element>
317
                        <xs:element name="verAplic" type="TVerAplic">
318
                                <xs:annotation>
319
                                        <xs:documentation>Versão do Aplicativo que recebeu o Evento</xs:documentation>
320
                                </xs:annotation>
321
                        </xs:element>
322
                        <xs:element name="cOrgao" type="TCOrgaoIBGE">
323
                                <xs:annotation>
324
                                        <xs:documentation>Código do òrgao que registrou o Evento</xs:documentation>
325
                                </xs:annotation>
326
                        </xs:element>
327
                        <xs:element name="cStat" type="TStat">
328
                                <xs:annotation>
329
                                        <xs:documentation>Código do status da registro do Evento</xs:documentation>
330
                                </xs:annotation>
331
                        </xs:element>
332
                        <xs:element name="xMotivo" type="TMotivo">
333
                                <xs:annotation>
334
                                        <xs:documentation>Descrição literal do status do registro do Evento</xs:documentation>
335
                                </xs:annotation>
336
                        </xs:element>
337
                        <xs:element name="retEvento" type="TretEvento" minOccurs="0" maxOccurs="20"/>
338
                </xs:sequence>
339
                <xs:attribute name="versao" type="TVerEnvEvento" use="required"/>
340
        </xs:complexType>
341
        <xs:complexType name="TProcEvento">
342
                <xs:annotation>
343
                        <xs:documentation>Tipo procEvento</xs:documentation>
344
                </xs:annotation>
345
                <xs:sequence>
346
                        <xs:element name="evento" type="TEvento"/>
347
                        <xs:element name="retEvento" type="TretEvento"/>
348
                </xs:sequence>
349
                <xs:attribute name="versao" type="TVerEvento" use="required"/>
350
        </xs:complexType>
351
        <xs:simpleType name="TVerEnvEvento">
352
                <xs:annotation>
353
                        <xs:documentation>Tipo Versão do EnvEvento</xs:documentation>
354
                </xs:annotation>
355
                <xs:restriction base="xs:string">
356
                        <xs:whiteSpace value="preserve"/>
357
                        <xs:pattern value="1\.00"/>
358
                </xs:restriction>
359
        </xs:simpleType>
360
        <xs:simpleType name="TVerEvento">
361
                <xs:annotation>
362
                        <xs:documentation>Tipo Versão do Evento</xs:documentation>
363
                </xs:annotation>
364
                <xs:restriction base="xs:string">
365
                        <xs:whiteSpace value="preserve"/>
366
                        <xs:pattern value="1\.00"/>
367
                </xs:restriction>
368
        </xs:simpleType>
369
</xs:schema>