<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">

<xs:element name="PTE44C">
  <xs:annotation>
    <xs:documentation> ; Envelope da Mensagem; O; </xs:documentation>
  </xs:annotation>
  <xs:complexType>
    <xs:sequence>
      <xs:element name="messageSender">
        <xs:annotation>
          <xs:documentation> ; Emissor (Sender); O; </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:maxLength value="35"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="messageRecipient">
        <xs:annotation>
          <xs:documentation> ; Recetor; O; </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:maxLength value="35"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="preparationDateAndTime">
        <xs:annotation>
          <xs:documentation> ; Data e hora de preparação; O; </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:length value="19"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="messageIdentification">
        <xs:annotation>
          <xs:documentation> ; Identificação da mensagem; O; </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:maxLength value="35"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="messageType">
        <xs:annotation>
          <xs:documentation> ; Tipo de mensagem; O; </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:length value="6"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="correlationIdentifier" minOccurs="0">
        <xs:annotation>
          <xs:documentation> ; Identificador de correlação; C; </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:maxLength value="35"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="ExportOperation">
        <xs:annotation>
          <xs:documentation> ; Operação de exportação; O; </xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="MRN">
              <xs:annotation>
                <xs:documentation> ; MRN; O; </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:maxLength value="18"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="otherThingsToReport" minOccurs="0">
              <xs:annotation>
                <xs:documentation> ; Outras coisas a reportar; C; </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:maxLength value="512"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="declarationType">
              <xs:annotation>
                <xs:documentation>11 01 000 000 ; Tipo de declaração; O; </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:maxLength value="5"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="additionalDeclarationType">
              <xs:annotation>
                <xs:documentation>11 02 000 000 ; Tipo de declaração adicional; O; </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:length value="1"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="security" minOccurs="0">
              <xs:annotation>
                <xs:documentation>11 07 000 000 ; Segurança; C; </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:int">
                  <xs:totalDigits value="1"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="specificCircumstanceIndicator" minOccurs="0">
              <xs:annotation>
                <xs:documentation>11 04 000 000 ; Indicador de circunstâncias especificas; C; </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:length value="3"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="totalAmountInvoiced" minOccurs="0">
              <xs:annotation>
                <xs:documentation>14 06 000 000 ; Montante total faturado; C; </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:decimal">
                  <xs:maxInclusive value="9999999999999999.99"/>
                  <xs:fractionDigits value="2"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="invoiceCurrency" minOccurs="0">
              <xs:annotation>
                <xs:documentation>14 05 000 000 ; Moeda de faturação; C; </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:length value="3"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="Authorisation" minOccurs="0" maxOccurs="99">
        <xs:annotation>
          <xs:documentation>12 12 000 000 ; Autorização; C; </xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="sequenceNumber">
              <xs:annotation>
                <xs:documentation> ; N.º de sequência; O; </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:int">
                  <xs:maxInclusive value="99999"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="type">
              <xs:annotation>
                <xs:documentation>12 12 002 000 ; Tipo; O; </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:maxLength value="4"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="referenceNumber">
              <xs:annotation>
                <xs:documentation>12 12 001 000 ; N.º de referência; O; </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:maxLength value="35"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="holderOfAuthorisation" minOccurs="0">
              <xs:annotation>
                <xs:documentation>12 12 080 000 ; Titular da autorização; C; </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:maxLength value="17"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="CustomsOfficeOfPresentation" minOccurs="0">
        <xs:annotation>
          <xs:documentation>17 09 000 000 ; Estância aduaneira de apresentação; C; </xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="referenceNumber">
              <xs:annotation>
                <xs:documentation>17 09 001 000 ; N.º de referência; O; </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:length value="8"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="CustomsOfficeOfExport">
        <xs:annotation>
          <xs:documentation>17 02 000 000 ; Estância aduaneira de exportação; O; </xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="referenceNumber">
              <xs:annotation>
                <xs:documentation>17 02 001 000 ; N.º de referência; O; </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:length value="8"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="CustomsOfficeOfExitDeclared">
        <xs:annotation>
          <xs:documentation>17 01 000 000  ; Estância aduaneira de saída (declarada); O; </xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="referenceNumber">
              <xs:annotation>
                <xs:documentation>17 01 001 000  ; N.º de referência; O; </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:length value="8"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="SupervisingCustomsOffice" minOccurs="0">
        <xs:annotation>
          <xs:documentation>17 10 000 000 ; Estância aduaneira de controlo; C; </xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="referenceNumber">
              <xs:annotation>
                <xs:documentation>17 10 001 000 ; N.º de referência; O; </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:length value="8"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="Exporter" minOccurs="0">
        <xs:annotation>
          <xs:documentation>13 01 000 000 ; Exportador; C; </xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="identificationNumber" minOccurs="0">
              <xs:annotation>
                <xs:documentation>13 01 017 000 ; N.º de identificação; C; </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:maxLength value="17"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="name" minOccurs="0">
              <xs:annotation>
                <xs:documentation>13 01 016 000 ; Nome; C; </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:maxLength value="70"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="Address" minOccurs="0">
              <xs:annotation>
                <xs:documentation>13 01 018 000 ; Endereço; C; </xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="streetAndNumber">
                    <xs:annotation>
                      <xs:documentation>13 01 018 019 ; Rua e n.º; O; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="70"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="postcode" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>13 01 018 021 ; Código postal; C; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="17"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="city">
                    <xs:annotation>
                      <xs:documentation>13 01 018 022 ; Localidade; O; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="35"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="country">
                    <xs:annotation>
                      <xs:documentation>13 01 018 020 ; País; O; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:length value="2"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="Declarant">
        <xs:annotation>
          <xs:documentation>13 05 000 000 ; Declarante; O; </xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="identificationNumber">
              <xs:annotation>
                <xs:documentation>13 05 017 000 ; N.º de identificação; O; </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:maxLength value="17"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="name" minOccurs="0">
              <xs:annotation>
                <xs:documentation>13 05 016 000 ; Nome; C; </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:maxLength value="70"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="Address" minOccurs="0">
              <xs:annotation>
                <xs:documentation>13 05 018 000 ; Endereço; C; </xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="streetAndNumber">
                    <xs:annotation>
                      <xs:documentation>13 05 018 019 ; Rua e n.º; O; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="70"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="postcode" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>13 05 018 021 ; Código postal; C; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="17"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="city">
                    <xs:annotation>
                      <xs:documentation>13 05 018 022 ; Localidade; O; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="35"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="country">
                    <xs:annotation>
                      <xs:documentation>13 05 018 020 ; País; O; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:length value="2"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
            <xs:element name="ContactPerson" minOccurs="0">
              <xs:annotation>
                <xs:documentation>13 05 074 000 ; Pessoa de contacto; F; </xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="name">
                    <xs:annotation>
                      <xs:documentation>13 05 074 016 ; Nome; O; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="70"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="phoneNumber">
                    <xs:annotation>
                      <xs:documentation>13 05 074 075 ; N.º de telefone; O; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="35"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="eMailAddress" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>13 05 074 076 ; Endereço eletrónico; F; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="256"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="Representative" minOccurs="0">
        <xs:annotation>
          <xs:documentation>13 06 000 000 ; Representante; C; </xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="identificationNumber">
              <xs:annotation>
                <xs:documentation>13 06 017 000 ; N.º de identificação; O; </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:maxLength value="17"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="status">
              <xs:annotation>
                <xs:documentation>13 06 030 000 ; Estatuto; O; </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:int">
                  <xs:totalDigits value="1"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="ContactPerson" minOccurs="0">
              <xs:annotation>
                <xs:documentation>13 06 074 000 ; Pessoa de contacto; F; </xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="name">
                    <xs:annotation>
                      <xs:documentation>13 06 074 016 ; Nome; O; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="70"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="phoneNumber">
                    <xs:annotation>
                      <xs:documentation>13 06 074 075 ; N.º de telefone; O; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="35"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="eMailAddress" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>13 06 074 076 ; Endereço eletrónico; F; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="256"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="CurrencyExchange" minOccurs="0">
        <xs:annotation>
          <xs:documentation> ; Moeda de câmbio; C; </xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="internalCurrencyUnit" minOccurs="0">
              <xs:annotation>
                <xs:documentation>14 17 000 000 ; Unidade monetária interna; F; </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:length value="3"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="exchangeRate" minOccurs="0">
              <xs:annotation>
                <xs:documentation>14 09 000 000 ; Taxa de câmbio; C; </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:decimal">
                  <xs:maxInclusive value="999999999999.99999"/>
                  <xs:fractionDigits value="5"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="DeferredPayment" minOccurs="0">
        <xs:annotation>
          <xs:documentation> ; Diferimento de pagamento; C; </xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="deferredPayment">
              <xs:annotation>
                <xs:documentation>12 10 000 000 ; Diferimento de pagamento; O; </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:maxLength value="35"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="ControlResult">
        <xs:annotation>
          <xs:documentation> ; Resultado do Controlo; O; </xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="code">
              <xs:annotation>
                <xs:documentation> ; Código; O; </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:length value="2"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="date">
              <xs:annotation>
                <xs:documentation> ; Data; O; </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:length value="10"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="text" minOccurs="0">
              <xs:annotation>
                <xs:documentation> ; Texto; F; </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:maxLength value="512"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="deliveredDocuments">
              <xs:annotation>
                <xs:documentation> ; Documentos entregues; O; </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:int">
                  <xs:totalDigits value="1"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="pendingSampleResults">
              <xs:annotation>
                <xs:documentation> ; Pendente de resultados de amostras; O; </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:int">
                  <xs:totalDigits value="1"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="ControlDetails" minOccurs="0" maxOccurs="99">
        <xs:annotation>
          <xs:documentation> ; Detalhes do Controlo; C; </xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="sequenceNumber">
              <xs:annotation>
                <xs:documentation> ; Nº de sequência; O; </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:int">
                  <xs:maxInclusive value="99999"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="type">
              <xs:annotation>
                <xs:documentation> ; Tipo; O; </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:maxLength value="3"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="riskAreaCode">
              <xs:annotation>
                <xs:documentation> ; Código da área de risco; O; </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:maxLength value="7"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="text" minOccurs="0">
              <xs:annotation>
                <xs:documentation> ; Texto; C; </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:maxLength value="512"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="code">
              <xs:annotation>
                <xs:documentation> ; Código; O; </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:length value="2"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="date">
              <xs:annotation>
                <xs:documentation> ; Data; O; </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:length value="10"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="GoodsReference" minOccurs="0" maxOccurs="999">
              <xs:annotation>
                <xs:documentation> ; Referência das mercadorias; C; </xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="sequenceNumber">
                    <xs:annotation>
                      <xs:documentation> ; Nº de sequência; O; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:int">
                        <xs:maxInclusive value="99999"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="declarationGoodsItemNumber">
                    <xs:annotation>
                      <xs:documentation>19 07 044 000 ; Referência das mercadorias (nº da adição); O; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:int">
                        <xs:maxInclusive value="99999"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="GoodsShipment" minOccurs="0">
        <xs:annotation>
          <xs:documentation> ; Remessa de mercadorias; C; </xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="sequenceNumber" minOccurs="0">
              <xs:annotation>
                <xs:documentation> ; N.º de sequência; C; </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:int">
                  <xs:maxInclusive value="99999"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="declarationAcceptanceDate" minOccurs="0">
              <xs:annotation>
                <xs:documentation>15 09 000 000 ; Data da aceitação; C; </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:maxLength value="19"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="natureOfTransaction" minOccurs="0">
              <xs:annotation>
                <xs:documentation>99 05 000 000  ; Natureza da transação; C; </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:int">
                  <xs:maxInclusive value="99"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="countryOfExport" minOccurs="0">
              <xs:annotation>
                <xs:documentation>16 07 000 000  ; País de exportação; C; </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:length value="2"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="countryOfDestination" minOccurs="0">
              <xs:annotation>
                <xs:documentation>16 03 000 000 ; País de destino; C; </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:length value="2"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="AdditionalSupplyChainActor" minOccurs="0" maxOccurs="99">
              <xs:annotation>
                <xs:documentation>13 14 000 000 ; Outros intervenientes na cadeia logistica; C; </xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="sequenceNumber">
                    <xs:annotation>
                      <xs:documentation> ; N.º de sequência; O; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:int">
                        <xs:maxInclusive value="99999"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="role">
                    <xs:annotation>
                      <xs:documentation>13 14 031 000 ; Função; O; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="3"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="identificationNumber">
                    <xs:annotation>
                      <xs:documentation>13 14 017 000 ; N.º de identificação; O; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="17"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
            <xs:element name="DeliveryTerms" minOccurs="0">
              <xs:annotation>
                <xs:documentation>14 01 000 000 ; Condições de entrega; C; </xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="incotermCode">
                    <xs:annotation>
                      <xs:documentation>14 01 035 000 ; Código INCOTERM; O; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:length value="3"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="UNLocode" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>14 01 036 000 ; UN/LOCODE; C; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="17"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="location" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>14 01 037 000 ; Localização; C; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="35"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="country" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>14 01 020 000 ; País; C; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:length value="2"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="text" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation> ; Texto; C; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="512"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
            <xs:element name="Warehouse" minOccurs="0">
              <xs:annotation>
                <xs:documentation>12 11 000 000 ; Entreposto; C; </xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="type">
                    <xs:annotation>
                      <xs:documentation>12 11 002 000 ; Tipo; O; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:length value="1"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="identifier">
                    <xs:annotation>
                      <xs:documentation>12 11 015 000 ; Identificador; O; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="35"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
            <xs:element name="PreviousDocument" minOccurs="0" maxOccurs="99">
              <xs:annotation>
                <xs:documentation>12 01 000 000 ; Documentos precedentes; C; </xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="sequenceNumber">
                    <xs:annotation>
                      <xs:documentation> ; N.º de sequência; O; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:int">
                        <xs:maxInclusive value="99999"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="type" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>12 01 002 000 ; Tipo; F; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:length value="4"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="referenceNumber" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>12 01 001 000 ; N.º de referência; F; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="70"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
            <xs:element name="SupportingDocument" minOccurs="0" maxOccurs="99">
              <xs:annotation>
                <xs:documentation>12 03 000 000 ; Documentos de suporte; C; </xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="sequenceNumber">
                    <xs:annotation>
                      <xs:documentation> ; N.º de sequência; O; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:int">
                        <xs:maxInclusive value="99999"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="type" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>12 03 002 000 ; Tipo; F; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:length value="4"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="referenceNumber" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>12 03 001 000 ; N.º de referência; F; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="70"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="documentLineItemNumber" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>12 03 013 000 ; N.º da linha da adição no documento; F; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:int">
                        <xs:maxInclusive value="99999"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="issuingAuthorityName" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>12 03 010 000 ; Designação da entidade emissora; F; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="70"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="validityDate" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>12 03 011 000 ; Data de validade; F; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:length value="10"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
            <xs:element name="AdditionalReference" minOccurs="0" maxOccurs="99">
              <xs:annotation>
                <xs:documentation>12 04 000 000 ; Referências adicionais; C; </xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="sequenceNumber">
                    <xs:annotation>
                      <xs:documentation> ; N.º de sequência; O; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:int">
                        <xs:maxInclusive value="99999"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="type" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>12 04 002 000 ; Tipo; F; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:length value="4"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="referenceNumber" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>12 04 001 000 ; N.º de referência; F; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="70"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
            <xs:element name="AdditionalInformation" minOccurs="0" maxOccurs="99">
              <xs:annotation>
                <xs:documentation>12 02 000 000 ; Informações adicionais; C; </xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="sequenceNumber">
                    <xs:annotation>
                      <xs:documentation> ; N.º de sequência; O; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:int">
                        <xs:maxInclusive value="99999"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="code">
                    <xs:annotation>
                      <xs:documentation>12 02 008 000 ; Código; O; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:length value="5"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="text" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>12 02 009 000 ; Texto; F; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="512"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
            <xs:element name="Consignment" minOccurs="0">
              <xs:annotation>
                <xs:documentation> ; Remessa; C; </xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="containerIndicator" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>19 01 000 000 ; Indicador de contentor; C; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:int">
                        <xs:totalDigits value="1"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="inlandModeOfTransport" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>19 04 000 000 ; Modo de transporte interior; C; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:int">
                        <xs:totalDigits value="1"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="modeOfTransportAtTheBorder" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>19 03 000 000 ; Modo de transporte na fronteira; C; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:int">
                        <xs:totalDigits value="1"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="grossMass" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>18 04 000 000 ; Massa bruta; F; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:decimal">
                        <xs:maxInclusive value="9999999999999999.999999"/>
                        <xs:fractionDigits value="6"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="referenceNumberUCR" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>12 08 000 000  ; N.º de referência/NRUR; F; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="35"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="Carrier" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>13 12 000 000 ; Transportador; C; </xs:documentation>
                    </xs:annotation>
                    <xs:complexType>
                      <xs:sequence>
                        <xs:element name="identificationNumber">
                          <xs:annotation>
                            <xs:documentation>13 12 017 000 ; N.º de identificação; O; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:maxLength value="17"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>
                  <xs:element name="Consignor" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>13 02 000 000 ; Expedidor; C; </xs:documentation>
                    </xs:annotation>
                    <xs:complexType>
                      <xs:sequence>
                        <xs:element name="identificationNumber" minOccurs="0">
                          <xs:annotation>
                            <xs:documentation>13 02 017 000 ; N.º de identificação; F; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:maxLength value="17"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="name" minOccurs="0">
                          <xs:annotation>
                            <xs:documentation>13 02 016 000 ; Nome; C; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:maxLength value="70"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="Address" minOccurs="0">
                          <xs:annotation>
                            <xs:documentation>13 02 018 000 ; Endereço; C; </xs:documentation>
                          </xs:annotation>
                          <xs:complexType>
                            <xs:sequence>
                              <xs:element name="streetAndNumber">
                                <xs:annotation>
                                  <xs:documentation>13 02 018 019 ; Rua e n.º; O; </xs:documentation>
                                </xs:annotation>
                                <xs:simpleType>
                                  <xs:restriction base="xs:string">
                                    <xs:maxLength value="70"/>
                                  </xs:restriction>
                                </xs:simpleType>
                              </xs:element>
                              <xs:element name="postcode" minOccurs="0">
                                <xs:annotation>
                                  <xs:documentation>13 02 018 021 ; Código postal; C; </xs:documentation>
                                </xs:annotation>
                                <xs:simpleType>
                                  <xs:restriction base="xs:string">
                                    <xs:maxLength value="17"/>
                                  </xs:restriction>
                                </xs:simpleType>
                              </xs:element>
                              <xs:element name="city">
                                <xs:annotation>
                                  <xs:documentation>13 02 018 022 ; Localidade; O; </xs:documentation>
                                </xs:annotation>
                                <xs:simpleType>
                                  <xs:restriction base="xs:string">
                                    <xs:maxLength value="35"/>
                                  </xs:restriction>
                                </xs:simpleType>
                              </xs:element>
                              <xs:element name="country">
                                <xs:annotation>
                                  <xs:documentation>13 02 018 020 ; País; O; </xs:documentation>
                                </xs:annotation>
                                <xs:simpleType>
                                  <xs:restriction base="xs:string">
                                    <xs:length value="2"/>
                                  </xs:restriction>
                                </xs:simpleType>
                              </xs:element>
                            </xs:sequence>
                          </xs:complexType>
                        </xs:element>
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>
                  <xs:element name="Consignee" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>13 03 000 000 ; Destinatário; C; </xs:documentation>
                    </xs:annotation>
                    <xs:complexType>
                      <xs:sequence>
                        <xs:element name="identificationNumber" minOccurs="0">
                          <xs:annotation>
                            <xs:documentation>13 03 017 000 ; N.º de identificação; F; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:maxLength value="17"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="name" minOccurs="0">
                          <xs:annotation>
                            <xs:documentation>13 03 016 000 ; Nome; C; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:maxLength value="70"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="Address" minOccurs="0">
                          <xs:annotation>
                            <xs:documentation>13 03 018 000 ; Endereço; C; </xs:documentation>
                          </xs:annotation>
                          <xs:complexType>
                            <xs:sequence>
                              <xs:element name="streetAndNumber">
                                <xs:annotation>
                                  <xs:documentation>13 03 018 019 ; Rua e n.º; O; </xs:documentation>
                                </xs:annotation>
                                <xs:simpleType>
                                  <xs:restriction base="xs:string">
                                    <xs:maxLength value="70"/>
                                  </xs:restriction>
                                </xs:simpleType>
                              </xs:element>
                              <xs:element name="postcode" minOccurs="0">
                                <xs:annotation>
                                  <xs:documentation>13 03 018 021 ; Código postal; C; </xs:documentation>
                                </xs:annotation>
                                <xs:simpleType>
                                  <xs:restriction base="xs:string">
                                    <xs:maxLength value="17"/>
                                  </xs:restriction>
                                </xs:simpleType>
                              </xs:element>
                              <xs:element name="city" minOccurs="0">
                                <xs:annotation>
                                  <xs:documentation>13 03 018 022 ; Localidade; C; </xs:documentation>
                                </xs:annotation>
                                <xs:simpleType>
                                  <xs:restriction base="xs:string">
                                    <xs:maxLength value="35"/>
                                  </xs:restriction>
                                </xs:simpleType>
                              </xs:element>
                              <xs:element name="country">
                                <xs:annotation>
                                  <xs:documentation>13 03 018 020 ; País; O; </xs:documentation>
                                </xs:annotation>
                                <xs:simpleType>
                                  <xs:restriction base="xs:string">
                                    <xs:length value="2"/>
                                  </xs:restriction>
                                </xs:simpleType>
                              </xs:element>
                            </xs:sequence>
                          </xs:complexType>
                        </xs:element>
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>
                  <xs:element name="TransportEquipment" minOccurs="0" maxOccurs="9999">
                    <xs:annotation>
                      <xs:documentation>19 07 000 000 ; Equipamento de transporte; C; </xs:documentation>
                    </xs:annotation>
                    <xs:complexType>
                      <xs:sequence>
                        <xs:element name="sequenceNumber">
                          <xs:annotation>
                            <xs:documentation> ; N.º de sequência; O; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:int">
                              <xs:maxInclusive value="99999"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="containerIdentificationNumber" minOccurs="0">
                          <xs:annotation>
                            <xs:documentation>19 07 063 000 ; N.º de identificação do contentor; F; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:maxLength value="17"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="numberOfSeals" minOccurs="0">
                          <xs:annotation>
                            <xs:documentation>19 10 068 000 ; N.º de selos; F; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:int">
                              <xs:maxInclusive value="9999"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="Seal" minOccurs="0" maxOccurs="99">
                          <xs:annotation>
                            <xs:documentation>19 10 000 000 ; Selos; C; </xs:documentation>
                          </xs:annotation>
                          <xs:complexType>
                            <xs:sequence>
                              <xs:element name="sequenceNumber">
                                <xs:annotation>
                                  <xs:documentation> ; N.º de sequência; O; </xs:documentation>
                                </xs:annotation>
                                <xs:simpleType>
                                  <xs:restriction base="xs:int">
                                    <xs:maxInclusive value="99999"/>
                                  </xs:restriction>
                                </xs:simpleType>
                              </xs:element>
                              <xs:element name="identifier" minOccurs="0">
                                <xs:annotation>
                                  <xs:documentation>19 10 015 000 ; Identificador; F; </xs:documentation>
                                </xs:annotation>
                                <xs:simpleType>
                                  <xs:restriction base="xs:string">
                                    <xs:maxLength value="20"/>
                                  </xs:restriction>
                                </xs:simpleType>
                              </xs:element>
                            </xs:sequence>
                          </xs:complexType>
                        </xs:element>
                        <xs:element name="GoodsReference" minOccurs="0" maxOccurs="999">
                          <xs:annotation>
                            <xs:documentation> ; Referência das mercadorias; C; </xs:documentation>
                          </xs:annotation>
                          <xs:complexType>
                            <xs:sequence>
                              <xs:element name="sequenceNumber">
                                <xs:annotation>
                                  <xs:documentation> ; N.º de sequência; O; </xs:documentation>
                                </xs:annotation>
                                <xs:simpleType>
                                  <xs:restriction base="xs:int">
                                    <xs:maxInclusive value="99999"/>
                                  </xs:restriction>
                                </xs:simpleType>
                              </xs:element>
                              <xs:element name="declarationGoodsItemNumber" minOccurs="0">
                                <xs:annotation>
                                  <xs:documentation>19 07 044 000 ; Referência das mercadorias (n.º da adição) ; F; </xs:documentation>
                                </xs:annotation>
                                <xs:simpleType>
                                  <xs:restriction base="xs:int">
                                    <xs:maxInclusive value="99999"/>
                                  </xs:restriction>
                                </xs:simpleType>
                              </xs:element>
                            </xs:sequence>
                          </xs:complexType>
                        </xs:element>
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>
                  <xs:element name="DepartureTransportMeans" minOccurs="0" maxOccurs="999">
                    <xs:annotation>
                      <xs:documentation>19 05 000 000 ; Meio de transporte à partida; C; </xs:documentation>
                    </xs:annotation>
                    <xs:complexType>
                      <xs:sequence>
                        <xs:element name="sequenceNumber">
                          <xs:annotation>
                            <xs:documentation> ; N.º de sequência; O; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:int">
                              <xs:maxInclusive value="99999"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="typeOfIdentification" minOccurs="0">
                          <xs:annotation>
                            <xs:documentation>19 05 061 000 ; Tipo de identificação; F; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:int">
                              <xs:totalDigits value="2"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="identificationNumber" minOccurs="0">
                          <xs:annotation>
                            <xs:documentation>19 05 017 000 ; N.º de identificação; F; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:maxLength value="35"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="nationality" minOccurs="0">
                          <xs:annotation>
                            <xs:documentation>19 05 062 000 ; Nacionalidade; F; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:length value="2"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>
                  <xs:element name="CountryOfRoutingOfConsignment" minOccurs="0" maxOccurs="99">
                    <xs:annotation>
                      <xs:documentation>16 12 000 000 ; Países de rota da remessa; C; </xs:documentation>
                    </xs:annotation>
                    <xs:complexType>
                      <xs:sequence>
                        <xs:element name="sequenceNumber">
                          <xs:annotation>
                            <xs:documentation> ; N.º de sequência; O; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:int">
                              <xs:maxInclusive value="99999"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="country">
                          <xs:annotation>
                            <xs:documentation>16 12 020 000 ; País; O; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:length value="2"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>
                  <xs:element name="ActiveBorderTransportMeans" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>19 08 000 000 ; Meio de transporte ativo na fronteira; C; </xs:documentation>
                    </xs:annotation>
                    <xs:complexType>
                      <xs:sequence>
                        <xs:element name="typeOfIdentification">
                          <xs:annotation>
                            <xs:documentation>19 08 061 000 ; Tipo de identificação; O; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:int">
                              <xs:totalDigits value="2"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="identificationNumber">
                          <xs:annotation>
                            <xs:documentation>19 08 017 000 ; N.º de identificação; O; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:maxLength value="35"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="nationality">
                          <xs:annotation>
                            <xs:documentation>19 08 062 000 ; Nacionalidade; O; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:length value="2"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>
                  <xs:element name="TransportDocument" minOccurs="0" maxOccurs="99">
                    <xs:annotation>
                      <xs:documentation>12 05 000 000 ; Documentos de transporte; C; </xs:documentation>
                    </xs:annotation>
                    <xs:complexType>
                      <xs:sequence>
                        <xs:element name="sequenceNumber">
                          <xs:annotation>
                            <xs:documentation> ; N.º de sequência; O; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:int">
                              <xs:maxInclusive value="99999"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="type" minOccurs="0">
                          <xs:annotation>
                            <xs:documentation>12 05 002 000 ; Tipo; F; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:length value="4"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="referenceNumber" minOccurs="0">
                          <xs:annotation>
                            <xs:documentation>12 05 001 000 ; N.º de referência; F; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:maxLength value="70"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>
                  <xs:element name="TransportCharges" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>14 02 000 000 ; Despesas de transporte; C; </xs:documentation>
                    </xs:annotation>
                    <xs:complexType>
                      <xs:sequence>
                        <xs:element name="methodOfPayment">
                          <xs:annotation>
                            <xs:documentation>14 02 038 000 ; Método de pagamento; O; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:length value="1"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
            <xs:element name="GoodsItem" minOccurs="0" maxOccurs="999">
              <xs:annotation>
                <xs:documentation> ; Adição de mercadorias; C; </xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="sequenceNumber">
                    <xs:annotation>
                      <xs:documentation> ; Nº de sequência; O; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:int">
                        <xs:maxInclusive value="99999"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="declarationGoodsItemNumber">
                    <xs:annotation>
                      <xs:documentation>11 03 000 000 ; N.º da adição; O; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:int">
                        <xs:maxInclusive value="99999"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="declarationAcceptanceDate" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>15 09 000 000 ; Data da aceitação; C; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="19"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="statisticalValue" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>99 06 000 000 ; Valor estatístico; F; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:decimal">
                        <xs:maxInclusive value="9999999999999999.99"/>
                        <xs:fractionDigits value="2"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="natureOfTransaction" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>99 05 000 000 ; Natureza da transação; C; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:int">
                        <xs:maxInclusive value="99"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="countryOfExport" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>16 07 000 000 ; País de exportação; C; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:length value="2"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="countryOfDestination" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>16 03 000 000 ; País de destino; C; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:length value="2"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="referenceNumberUCR" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>12 08 000 000 ; N.º de referência/NRUR; F; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="35"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="Authorisation" minOccurs="0" maxOccurs="99">
                    <xs:annotation>
                      <xs:documentation>12 12 000 000 ; Autorização; C; </xs:documentation>
                    </xs:annotation>
                    <xs:complexType>
                      <xs:sequence>
                        <xs:element name="sequenceNumber">
                          <xs:annotation>
                            <xs:documentation> ; N.º de sequência; O; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:int">
                              <xs:maxInclusive value="99999"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="type">
                          <xs:annotation>
                            <xs:documentation>12 12 002 000 ; Tipo; O; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:maxLength value="4"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="referenceNumber">
                          <xs:annotation>
                            <xs:documentation>12 12 001 000 ; N.º de referência; O; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:maxLength value="35"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="holderOfAuthorisation" minOccurs="0">
                          <xs:annotation>
                            <xs:documentation>12 12 080 000 ; Titular da autorização; C; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:maxLength value="17"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>
                  <xs:element name="Procedure" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>11 09 000 000 ; Regime; C; </xs:documentation>
                    </xs:annotation>
                    <xs:complexType>
                      <xs:sequence>
                        <xs:element name="requestedProcedure">
                          <xs:annotation>
                            <xs:documentation>11 09 001 000 ; Regime solicitado; O; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:length value="2"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="previousProcedure">
                          <xs:annotation>
                            <xs:documentation>11 09 002 000 ; Regime precedente; O; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:length value="2"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="AdditionalProcedure" minOccurs="0" maxOccurs="99">
                          <xs:annotation>
                            <xs:documentation>11 10 000 000 ; Regime adicional; C; </xs:documentation>
                          </xs:annotation>
                          <xs:complexType>
                            <xs:sequence>
                              <xs:element name="sequenceNumber">
                                <xs:annotation>
                                  <xs:documentation> ; N.º de sequência; O; </xs:documentation>
                                </xs:annotation>
                                <xs:simpleType>
                                  <xs:restriction base="xs:int">
                                    <xs:maxInclusive value="99999"/>
                                  </xs:restriction>
                                </xs:simpleType>
                              </xs:element>
                              <xs:element name="addicionalProcedure">
                                <xs:annotation>
                                  <xs:documentation> ; Regime adicional; O; </xs:documentation>
                                </xs:annotation>
                                <xs:simpleType>
                                  <xs:restriction base="xs:string">
                                    <xs:length value="3"/>
                                  </xs:restriction>
                                </xs:simpleType>
                              </xs:element>
                            </xs:sequence>
                          </xs:complexType>
                        </xs:element>
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>
                  <xs:element name="Consignor" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>13 02 000 000 ; Expedidor; C; </xs:documentation>
                    </xs:annotation>
                    <xs:complexType>
                      <xs:sequence>
                        <xs:element name="identificationNumber" minOccurs="0">
                          <xs:annotation>
                            <xs:documentation>13 02 017 000 ; N.º de identificação; F; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:maxLength value="17"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="name" minOccurs="0">
                          <xs:annotation>
                            <xs:documentation>13 02 016 000 ; Nome; C; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:maxLength value="70"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="Address" minOccurs="0">
                          <xs:annotation>
                            <xs:documentation>13 02 018 000 ; Endereço; C; </xs:documentation>
                          </xs:annotation>
                          <xs:complexType>
                            <xs:sequence>
                              <xs:element name="streetAndNumber">
                                <xs:annotation>
                                  <xs:documentation>13 02 018 019 ; Rua e n.º; O; </xs:documentation>
                                </xs:annotation>
                                <xs:simpleType>
                                  <xs:restriction base="xs:string">
                                    <xs:maxLength value="70"/>
                                  </xs:restriction>
                                </xs:simpleType>
                              </xs:element>
                              <xs:element name="postcode" minOccurs="0">
                                <xs:annotation>
                                  <xs:documentation>13 02 018 021 ; Código postal; C; </xs:documentation>
                                </xs:annotation>
                                <xs:simpleType>
                                  <xs:restriction base="xs:string">
                                    <xs:maxLength value="17"/>
                                  </xs:restriction>
                                </xs:simpleType>
                              </xs:element>
                              <xs:element name="city">
                                <xs:annotation>
                                  <xs:documentation>13 02 018 022 ; Localidade; O; </xs:documentation>
                                </xs:annotation>
                                <xs:simpleType>
                                  <xs:restriction base="xs:string">
                                    <xs:maxLength value="35"/>
                                  </xs:restriction>
                                </xs:simpleType>
                              </xs:element>
                              <xs:element name="country">
                                <xs:annotation>
                                  <xs:documentation>13 02 018 020 ; País; O; </xs:documentation>
                                </xs:annotation>
                                <xs:simpleType>
                                  <xs:restriction base="xs:string">
                                    <xs:length value="2"/>
                                  </xs:restriction>
                                </xs:simpleType>
                              </xs:element>
                            </xs:sequence>
                          </xs:complexType>
                        </xs:element>
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>
                  <xs:element name="Consignee" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>13 03 000 000 ; Destinatário; C; </xs:documentation>
                    </xs:annotation>
                    <xs:complexType>
                      <xs:sequence>
                        <xs:element name="identificationNumber" minOccurs="0">
                          <xs:annotation>
                            <xs:documentation>13 03 017 000 ; N.º de identificação; F; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:maxLength value="17"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="name" minOccurs="0">
                          <xs:annotation>
                            <xs:documentation>13 03 016 000 ; Nome; C; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:maxLength value="70"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="Address" minOccurs="0">
                          <xs:annotation>
                            <xs:documentation>13 03 018 000 ; Endereço; C; </xs:documentation>
                          </xs:annotation>
                          <xs:complexType>
                            <xs:sequence>
                              <xs:element name="streetAndNumber">
                                <xs:annotation>
                                  <xs:documentation>13 03 018 019 ; Rua e n.º; O; </xs:documentation>
                                </xs:annotation>
                                <xs:simpleType>
                                  <xs:restriction base="xs:string">
                                    <xs:maxLength value="70"/>
                                  </xs:restriction>
                                </xs:simpleType>
                              </xs:element>
                              <xs:element name="postcode" minOccurs="0">
                                <xs:annotation>
                                  <xs:documentation>13 03 018 021 ; Código postal; C; </xs:documentation>
                                </xs:annotation>
                                <xs:simpleType>
                                  <xs:restriction base="xs:string">
                                    <xs:maxLength value="17"/>
                                  </xs:restriction>
                                </xs:simpleType>
                              </xs:element>
                              <xs:element name="city" minOccurs="0">
                                <xs:annotation>
                                  <xs:documentation>13 03 018 022 ; Localidade; C; </xs:documentation>
                                </xs:annotation>
                                <xs:simpleType>
                                  <xs:restriction base="xs:string">
                                    <xs:maxLength value="35"/>
                                  </xs:restriction>
                                </xs:simpleType>
                              </xs:element>
                              <xs:element name="country">
                                <xs:annotation>
                                  <xs:documentation>13 03 018 020 ; País; O; </xs:documentation>
                                </xs:annotation>
                                <xs:simpleType>
                                  <xs:restriction base="xs:string">
                                    <xs:length value="2"/>
                                  </xs:restriction>
                                </xs:simpleType>
                              </xs:element>
                            </xs:sequence>
                          </xs:complexType>
                        </xs:element>
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>
                  <xs:element name="AdditionalSupplyChainActor" minOccurs="0" maxOccurs="99">
                    <xs:annotation>
                      <xs:documentation>13 14 000 000 ; Outros intervenientes na cadeia logistica; C; </xs:documentation>
                    </xs:annotation>
                    <xs:complexType>
                      <xs:sequence>
                        <xs:element name="sequenceNumber">
                          <xs:annotation>
                            <xs:documentation> ; N.º de sequência; O; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:int">
                              <xs:maxInclusive value="99999"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="role">
                          <xs:annotation>
                            <xs:documentation>13 14 031 000 ; Função; O; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:maxLength value="3"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="identificationNumber">
                          <xs:annotation>
                            <xs:documentation>13 14 017 000 ; N.º de identificação; O; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:maxLength value="17"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>
                  <xs:element name="Origin" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation> ; Origem; C; </xs:documentation>
                    </xs:annotation>
                    <xs:complexType>
                      <xs:sequence>
                        <xs:element name="countryOfOrigin">
                          <xs:annotation>
                            <xs:documentation>16 08 000 000  ; País de origem; O; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:length value="2"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="regionOfDispatch" minOccurs="0">
                          <xs:annotation>
                            <xs:documentation>16 10 000 000 ; Região de expedição; F; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:maxLength value="9"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>
                  <xs:element name="Commodity" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation> ; Mercadoria; C; </xs:documentation>
                    </xs:annotation>
                    <xs:complexType>
                      <xs:sequence>
                        <xs:element name="descriptionOfGoods" minOccurs="0">
                          <xs:annotation>
                            <xs:documentation>18 05 000 000 ; Descrição das mercadorias; F; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:maxLength value="512"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="cusCode" minOccurs="0">
                          <xs:annotation>
                            <xs:documentation>18 08 000 000 ; Código CUS; F; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:length value="9"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="CommodityCode" minOccurs="0">
                          <xs:annotation>
                            <xs:documentation>18 09 000 000 ; Código da mercadoria; C; </xs:documentation>
                          </xs:annotation>
                          <xs:complexType>
                            <xs:sequence>
                              <xs:element name="harmonizedSystemSubHeadingCode" minOccurs="0">
                                <xs:annotation>
                                  <xs:documentation>18 09 056 000 ; Código SH; C; </xs:documentation>
                                </xs:annotation>
                                <xs:simpleType>
                                  <xs:restriction base="xs:string">
                                    <xs:length value="6"/>
                                  </xs:restriction>
                                </xs:simpleType>
                              </xs:element>
                              <xs:element name="combinedNomenclatureCode" minOccurs="0">
                                <xs:annotation>
                                  <xs:documentation>18 09 057 000 ; Código NC; C; </xs:documentation>
                                </xs:annotation>
                                <xs:simpleType>
                                  <xs:restriction base="xs:string">
                                    <xs:length value="2"/>
                                  </xs:restriction>
                                </xs:simpleType>
                              </xs:element>
                              <xs:element name="TARICAdditionalCode" minOccurs="0" maxOccurs="99">
                                <xs:annotation>
                                  <xs:documentation> ; Código adicional TARIC; C; </xs:documentation>
                                </xs:annotation>
                                <xs:complexType>
                                  <xs:sequence>
                                    <xs:element name="sequenceNumber">
                                      <xs:annotation>
                                        <xs:documentation> ; N.º de sequência; O; </xs:documentation>
                                      </xs:annotation>
                                      <xs:simpleType>
                                        <xs:restriction base="xs:int">
                                          <xs:maxInclusive value="99999"/>
                                        </xs:restriction>
                                      </xs:simpleType>
                                    </xs:element>
                                    <xs:element name="taricAdditionalCode" minOccurs="0">
                                      <xs:annotation>
                                        <xs:documentation>18 09 059 000 ; Código adicional TARIC; F; </xs:documentation>
                                      </xs:annotation>
                                      <xs:simpleType>
                                        <xs:restriction base="xs:string">
                                          <xs:length value="4"/>
                                        </xs:restriction>
                                      </xs:simpleType>
                                    </xs:element>
                                  </xs:sequence>
                                </xs:complexType>
                              </xs:element>
                              <xs:element name="NationalAdditionalCode" minOccurs="0" maxOccurs="99">
                                <xs:annotation>
                                  <xs:documentation> ; Código adicional nacional; C; </xs:documentation>
                                </xs:annotation>
                                <xs:complexType>
                                  <xs:sequence>
                                    <xs:element name="sequenceNumber">
                                      <xs:annotation>
                                        <xs:documentation> ; N.º de sequência; O; </xs:documentation>
                                      </xs:annotation>
                                      <xs:simpleType>
                                        <xs:restriction base="xs:int">
                                          <xs:maxInclusive value="99999"/>
                                        </xs:restriction>
                                      </xs:simpleType>
                                    </xs:element>
                                    <xs:element name="nationalAdditionalCode">
                                      <xs:annotation>
                                        <xs:documentation>18 09 060 000 ; Código adicional nacional; O; </xs:documentation>
                                      </xs:annotation>
                                      <xs:simpleType>
                                        <xs:restriction base="xs:string">
                                          <xs:maxLength value="4"/>
                                        </xs:restriction>
                                      </xs:simpleType>
                                    </xs:element>
                                  </xs:sequence>
                                </xs:complexType>
                              </xs:element>
                            </xs:sequence>
                          </xs:complexType>
                        </xs:element>
                        <xs:element name="DangerousGoods" minOccurs="0" maxOccurs="99">
                          <xs:annotation>
                            <xs:documentation>18 07 000 000 ; Mercadorias perigosas; C; </xs:documentation>
                          </xs:annotation>
                          <xs:complexType>
                            <xs:sequence>
                              <xs:element name="sequenceNumber">
                                <xs:annotation>
                                  <xs:documentation> ; N.º de sequência; O; </xs:documentation>
                                </xs:annotation>
                                <xs:simpleType>
                                  <xs:restriction base="xs:int">
                                    <xs:maxInclusive value="99999"/>
                                  </xs:restriction>
                                </xs:simpleType>
                              </xs:element>
                              <xs:element name="UNNumber" minOccurs="0">
                                <xs:annotation>
                                  <xs:documentation>18 07 055 000 ; N.º ONU; F; </xs:documentation>
                                </xs:annotation>
                                <xs:simpleType>
                                  <xs:restriction base="xs:string">
                                    <xs:length value="4"/>
                                  </xs:restriction>
                                </xs:simpleType>
                              </xs:element>
                            </xs:sequence>
                          </xs:complexType>
                        </xs:element>
                        <xs:element name="GoodsMeasure" minOccurs="0">
                          <xs:annotation>
                            <xs:documentation> ; Medidas das mercadorias; C; </xs:documentation>
                          </xs:annotation>
                          <xs:complexType>
                            <xs:sequence>
                              <xs:element name="grossMass" minOccurs="0">
                                <xs:annotation>
                                  <xs:documentation>18 04 000 000 ; Massa bruta; F; </xs:documentation>
                                </xs:annotation>
                                <xs:simpleType>
                                  <xs:restriction base="xs:decimal">
                                    <xs:maxInclusive value="9999999999999999.999999"/>
                                    <xs:fractionDigits value="6"/>
                                  </xs:restriction>
                                </xs:simpleType>
                              </xs:element>
                              <xs:element name="netMass" minOccurs="0">
                                <xs:annotation>
                                  <xs:documentation>18 01 000 000 ; Massa líquida; F; </xs:documentation>
                                </xs:annotation>
                                <xs:simpleType>
                                  <xs:restriction base="xs:decimal">
                                    <xs:maxInclusive value="9999999999999999.999999"/>
                                    <xs:fractionDigits value="6"/>
                                  </xs:restriction>
                                </xs:simpleType>
                              </xs:element>
                              <xs:element name="supplementaryUnits" minOccurs="0">
                                <xs:annotation>
                                  <xs:documentation>18 02 000 000 ; Unidades suplementares; C; </xs:documentation>
                                </xs:annotation>
                                <xs:simpleType>
                                  <xs:restriction base="xs:decimal">
                                    <xs:maxInclusive value="9999999999999999.999999"/>
                                    <xs:fractionDigits value="6"/>
                                  </xs:restriction>
                                </xs:simpleType>
                              </xs:element>
                            </xs:sequence>
                          </xs:complexType>
                        </xs:element>
                        <xs:element name="CalculationOfTaxes" minOccurs="0">
                          <xs:annotation>
                            <xs:documentation> ; Cálculo das imposições; C; </xs:documentation>
                          </xs:annotation>
                          <xs:complexType>
                            <xs:sequence>
                              <xs:element name="totalDutiesAndTaxesAmount">
                                <xs:annotation>
                                  <xs:documentation>14 16 000 000 ; Montante total dos direitos e imposições; O; </xs:documentation>
                                </xs:annotation>
                                <xs:simpleType>
                                  <xs:restriction base="xs:decimal">
                                    <xs:maxInclusive value="9999999999999999.99"/>
                                    <xs:fractionDigits value="2"/>
                                  </xs:restriction>
                                </xs:simpleType>
                              </xs:element>
                              <xs:element name="DutiesAndTaxes" minOccurs="0" maxOccurs="99">
                                <xs:annotation>
                                  <xs:documentation>14 03 000 000 ; Direitos e imposições; C; </xs:documentation>
                                </xs:annotation>
                                <xs:complexType>
                                  <xs:sequence>
                                    <xs:element name="sequenceNumber">
                                      <xs:annotation>
                                        <xs:documentation> ; N.º de sequência; O; </xs:documentation>
                                      </xs:annotation>
                                      <xs:simpleType>
                                        <xs:restriction base="xs:int">
                                          <xs:maxInclusive value="99999"/>
                                        </xs:restriction>
                                      </xs:simpleType>
                                    </xs:element>
                                    <xs:element name="taxType">
                                      <xs:annotation>
                                        <xs:documentation>14 03 039 000 ; Tipo de imposição; O; </xs:documentation>
                                      </xs:annotation>
                                      <xs:simpleType>
                                        <xs:restriction base="xs:string">
                                          <xs:length value="3"/>
                                        </xs:restriction>
                                      </xs:simpleType>
                                    </xs:element>
                                    <xs:element name="payableTaxAmount">
                                      <xs:annotation>
                                        <xs:documentation>14 03 042 000 ; Montante da imposição devido; O; </xs:documentation>
                                      </xs:annotation>
                                      <xs:simpleType>
                                        <xs:restriction base="xs:decimal">
                                          <xs:maxInclusive value="9999999999999999.99"/>
                                          <xs:fractionDigits value="2"/>
                                        </xs:restriction>
                                      </xs:simpleType>
                                    </xs:element>
                                    <xs:element name="methodOfPayment">
                                      <xs:annotation>
                                        <xs:documentation>14 03 038 000 ; Método de pagamento; O; </xs:documentation>
                                      </xs:annotation>
                                      <xs:simpleType>
                                        <xs:restriction base="xs:string">
                                          <xs:length value="1"/>
                                        </xs:restriction>
                                      </xs:simpleType>
                                    </xs:element>
                                    <xs:element name="TaxBase" minOccurs="0" maxOccurs="99">
                                      <xs:annotation>
                                        <xs:documentation>14 03 040 000 ; Base tributável; C; </xs:documentation>
                                      </xs:annotation>
                                      <xs:complexType>
                                        <xs:sequence>
                                          <xs:element name="sequenceNumber">
                                            <xs:annotation>
                                              <xs:documentation> ; N.º de sequência; O; </xs:documentation>
                                            </xs:annotation>
                                            <xs:simpleType>
                                              <xs:restriction base="xs:int">
                                                <xs:maxInclusive value="99999"/>
                                              </xs:restriction>
                                            </xs:simpleType>
                                          </xs:element>
                                          <xs:element name="taxRate">
                                            <xs:annotation>
                                              <xs:documentation>14 03 040 041 ; Taxa da imposição; O; </xs:documentation>
                                            </xs:annotation>
                                            <xs:simpleType>
                                              <xs:restriction base="xs:decimal">
                                                <xs:maxInclusive value="99999999999999999.999"/>
                                                <xs:fractionDigits value="3"/>
                                              </xs:restriction>
                                            </xs:simpleType>
                                          </xs:element>
                                          <xs:element name="measurementUnitAndQualifier" minOccurs="0">
                                            <xs:annotation>
                                              <xs:documentation>14 03 040 005 ; Unidade de medida e qualificador; C; </xs:documentation>
                                            </xs:annotation>
                                            <xs:simpleType>
                                              <xs:restriction base="xs:string">
                                                <xs:maxLength value="4"/>
                                              </xs:restriction>
                                            </xs:simpleType>
                                          </xs:element>
                                          <xs:element name="quantity" minOccurs="0">
                                            <xs:annotation>
                                              <xs:documentation>14 03 040 006 ; Quantidade; C; </xs:documentation>
                                            </xs:annotation>
                                            <xs:simpleType>
                                              <xs:restriction base="xs:decimal">
                                                <xs:maxInclusive value="9999999999999999.999999"/>
                                                <xs:fractionDigits value="6"/>
                                              </xs:restriction>
                                            </xs:simpleType>
                                          </xs:element>
                                          <xs:element name="amount" minOccurs="0">
                                            <xs:annotation>
                                              <xs:documentation>14 03 040 014 ; Montante; C; </xs:documentation>
                                            </xs:annotation>
                                            <xs:simpleType>
                                              <xs:restriction base="xs:decimal">
                                                <xs:maxInclusive value="9999999999999999.99"/>
                                                <xs:fractionDigits value="2"/>
                                              </xs:restriction>
                                            </xs:simpleType>
                                          </xs:element>
                                          <xs:element name="taxAmount">
                                            <xs:annotation>
                                              <xs:documentation>14 03 040 043 ; Montante da imposição; O; </xs:documentation>
                                            </xs:annotation>
                                            <xs:simpleType>
                                              <xs:restriction base="xs:decimal">
                                                <xs:maxInclusive value="9999999999999999.99"/>
                                                <xs:fractionDigits value="2"/>
                                              </xs:restriction>
                                            </xs:simpleType>
                                          </xs:element>
                                        </xs:sequence>
                                      </xs:complexType>
                                    </xs:element>
                                  </xs:sequence>
                                </xs:complexType>
                              </xs:element>
                            </xs:sequence>
                          </xs:complexType>
                        </xs:element>
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>
                  <xs:element name="Packaging" minOccurs="0" maxOccurs="99">
                    <xs:annotation>
                      <xs:documentation>18 06 000 000 ; Volumes; C; </xs:documentation>
                    </xs:annotation>
                    <xs:complexType>
                      <xs:sequence>
                        <xs:element name="sequenceNumber">
                          <xs:annotation>
                            <xs:documentation> ; N.º de sequência; O; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:int">
                              <xs:maxInclusive value="99999"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="typeOfPackages" minOccurs="0">
                          <xs:annotation>
                            <xs:documentation>18 06 003 000 ; Tipo de volumes; F; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:length value="2"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="numberOfPackages" minOccurs="0">
                          <xs:annotation>
                            <xs:documentation>18 06 004 000 ; N.º de volumes; F; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:int">
                              <xs:maxInclusive value="99999999"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="shippingMarks" minOccurs="0">
                          <xs:annotation>
                            <xs:documentation>18 06 054 000 ; Marcas de expedição; F; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:maxLength value="512"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>
                  <xs:element name="PreviousDocument" minOccurs="0" maxOccurs="99">
                    <xs:annotation>
                      <xs:documentation>12 01 000 000 ; Documentos precedentes; C; </xs:documentation>
                    </xs:annotation>
                    <xs:complexType>
                      <xs:sequence>
                        <xs:element name="sequenceNumber">
                          <xs:annotation>
                            <xs:documentation> ; N.º de sequência; O; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:int">
                              <xs:maxInclusive value="99999"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="type" minOccurs="0">
                          <xs:annotation>
                            <xs:documentation>12 01 002 000 ; Tipo; F; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:length value="4"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="referenceNumber" minOccurs="0">
                          <xs:annotation>
                            <xs:documentation>12 01 001 000 ; N.º de referência; F; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:maxLength value="70"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="goodsItemNumber" minOccurs="0">
                          <xs:annotation>
                            <xs:documentation>12 01 007 000  ; Identificador da adição; F; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:int">
                              <xs:maxInclusive value="99999"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="typeOfPackages" minOccurs="0">
                          <xs:annotation>
                            <xs:documentation>12 01 003 000 ; Tipo de volumes; F; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:length value="2"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="numberOfPackages" minOccurs="0">
                          <xs:annotation>
                            <xs:documentation>12 01 004 000 ; N.º de volumes; F; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:int">
                              <xs:maxInclusive value="99999999"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="measurementUnitAndQualifier" minOccurs="0">
                          <xs:annotation>
                            <xs:documentation>12 01 005 000 ; Unidade de medida e qualificador; C; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:maxLength value="4"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="quantity" minOccurs="0">
                          <xs:annotation>
                            <xs:documentation>12 01 006 000 ; Quantidade; F; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:decimal">
                              <xs:maxInclusive value="9999999999999999.999999"/>
                              <xs:fractionDigits value="6"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>
                  <xs:element name="SupportingDocument" minOccurs="0" maxOccurs="99">
                    <xs:annotation>
                      <xs:documentation>12 03 000 000 ; Documentos de suporte; C; </xs:documentation>
                    </xs:annotation>
                    <xs:complexType>
                      <xs:sequence>
                        <xs:element name="sequenceNumber">
                          <xs:annotation>
                            <xs:documentation> ; N.º de sequência; O; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:int">
                              <xs:maxInclusive value="99999"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="type" minOccurs="0">
                          <xs:annotation>
                            <xs:documentation>12 03 002 000 ; Tipo; F; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:length value="4"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="referenceNumber" minOccurs="0">
                          <xs:annotation>
                            <xs:documentation>12 03 001 000 ; N.º de referência; F; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:maxLength value="70"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="documentLineItemNumber" minOccurs="0">
                          <xs:annotation>
                            <xs:documentation>12 03 013 000 ; N.º da linha da adição no documento; F; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:int">
                              <xs:maxInclusive value="99999"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="issuingAuthorityName" minOccurs="0">
                          <xs:annotation>
                            <xs:documentation>12 03 010 000 ; Designação da entidade emissora; F; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:maxLength value="70"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="validityDate" minOccurs="0">
                          <xs:annotation>
                            <xs:documentation>12 03 011 000 ; Data de validade; F; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:length value="10"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="measurementUnitAndQualifier" minOccurs="0">
                          <xs:annotation>
                            <xs:documentation>12 03 005 000 ; Unidade de medida e qualificador; C; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:maxLength value="4"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="quantity" minOccurs="0">
                          <xs:annotation>
                            <xs:documentation>12 03 006 000 ; Quantidade; F; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:decimal">
                              <xs:maxInclusive value="9999999999999999.999999"/>
                              <xs:fractionDigits value="6"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="currency" minOccurs="0">
                          <xs:annotation>
                            <xs:documentation>12 03 012 000 ; Moeda; F; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:length value="3"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="amount" minOccurs="0">
                          <xs:annotation>
                            <xs:documentation>12 03 014 000 ; Montante; F; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:decimal">
                              <xs:maxInclusive value="9999999999999999.99"/>
                              <xs:fractionDigits value="2"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>
                  <xs:element name="TransportDocument" minOccurs="0" maxOccurs="99">
                    <xs:annotation>
                      <xs:documentation>12 05 000 000 ; Documentos de transporte; C; </xs:documentation>
                    </xs:annotation>
                    <xs:complexType>
                      <xs:sequence>
                        <xs:element name="sequenceNumber">
                          <xs:annotation>
                            <xs:documentation> ; N.º de sequência; O; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:int">
                              <xs:maxInclusive value="99999"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="type" minOccurs="0">
                          <xs:annotation>
                            <xs:documentation>12 05 002 000 ; Tipo; F; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:length value="4"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="referenceNumber" minOccurs="0">
                          <xs:annotation>
                            <xs:documentation>12 05 001 000 ; N.º de referência; F; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:maxLength value="70"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>
                  <xs:element name="AdditionalReference" minOccurs="0" maxOccurs="99">
                    <xs:annotation>
                      <xs:documentation>12 04 000 000 ; Referências adicionais; C; </xs:documentation>
                    </xs:annotation>
                    <xs:complexType>
                      <xs:sequence>
                        <xs:element name="sequenceNumber">
                          <xs:annotation>
                            <xs:documentation> ; N.º de sequência; O; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:int">
                              <xs:maxInclusive value="99999"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="type" minOccurs="0">
                          <xs:annotation>
                            <xs:documentation>12 04 002 000 ; Tipo; F; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:length value="4"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="referenceNumber" minOccurs="0">
                          <xs:annotation>
                            <xs:documentation>12 04 001 000 ; N.º de referência; F; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:maxLength value="70"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>
                  <xs:element name="AdditionalInformation" minOccurs="0" maxOccurs="99">
                    <xs:annotation>
                      <xs:documentation>12 02 000 000 ; Informações adicionais; C; </xs:documentation>
                    </xs:annotation>
                    <xs:complexType>
                      <xs:sequence>
                        <xs:element name="sequenceNumber">
                          <xs:annotation>
                            <xs:documentation> ; N.º de sequência; O; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:int">
                              <xs:maxInclusive value="99999"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="code">
                          <xs:annotation>
                            <xs:documentation>12 02 008 000 ; Código; O; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:length value="5"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="text" minOccurs="0">
                          <xs:annotation>
                            <xs:documentation>12 02 009 000 ; Texto; F; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:maxLength value="512"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>
                  <xs:element name="TransportCharges" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>14 02 000 000 ; Despesas de transporte; C; </xs:documentation>
                    </xs:annotation>
                    <xs:complexType>
                      <xs:sequence>
                        <xs:element name="methodOfPayment">
                          <xs:annotation>
                            <xs:documentation>14 02 038 000 ; Método de pagamento; O; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:length value="1"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="AuthorizationRequestsOutwardProcessing" minOccurs="0">
        <xs:annotation>
          <xs:documentation> ; Pedido de autorização de aperfeiçoamento passivo na declaração (coluna 8f do Anexo A, do AD-CAU); C ; </xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="customsOfficeOfDischargeCode" minOccurs="0">
              <xs:annotation>
                <xs:documentation>4/11 (Anexo A) ; Código da estância aduaneira de apuramento ; C; </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:length value="8"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="dischargeDeadline" minOccurs="0">
              <xs:annotation>
                <xs:documentation>4/17 (Anexo A) ; Prazo de apuramento ; C; </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:maxLength value="515"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="plannedActivitiesDetails" minOccurs="0">
              <xs:annotation>
                <xs:documentation>7/5 (Anexo A) ; Pormenores das atividades previstas ; C; </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:maxLength value="512"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="additionalInformation" minOccurs="0">
              <xs:annotation>
                <xs:documentation>8/5 (Anexo A) ; Informações adicionais; C; </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:maxLength value="512"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="PlaceOrPlacesOfProcessingOrUse" minOccurs="0" maxOccurs="999">
              <xs:annotation>
                <xs:documentation>4/9 (Anexo A) ; Local ou locais de transformação ou de utilização ; C; </xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="sequenceNumber">
                    <xs:annotation>
                      <xs:documentation> ; N.º de sequência ; O ; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:int">
                        <xs:maxInclusive value="99999"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="typeOfLocation">
                    <xs:annotation>
                      <xs:documentation> ; Tipo de localização; O ; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:length value="1"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="qualifierOfLocation">
                    <xs:annotation>
                      <xs:documentation> ; Qualificador da localização ; O ; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:length value="1"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="UNLocode" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation> ; UN/LOCODE ; C ; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="17"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="GNSS" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation> ; GNSS ; C ; </xs:documentation>
                    </xs:annotation>
                    <xs:complexType>
                      <xs:sequence>
                        <xs:element name="latitude">
                          <xs:annotation>
                            <xs:documentation> ; Latitude ; O ; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:maxLength value="17"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="longitude">
                          <xs:annotation>
                            <xs:documentation> ; Longitude ; O ; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:maxLength value="17"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>
                  <xs:element name="Address" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation> ; Endereço ; C ; </xs:documentation>
                    </xs:annotation>
                    <xs:complexType>
                      <xs:sequence>
                        <xs:element name="streetAndNumber">
                          <xs:annotation>
                            <xs:documentation> ; Rua e n.º; O ; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:maxLength value="70"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="postcode" minOccurs="0">
                          <xs:annotation>
                            <xs:documentation> ; Código postal; C ; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:maxLength value="17"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="city">
                          <xs:annotation>
                            <xs:documentation> ; Localidade ; O ; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:maxLength value="35"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="country">
                          <xs:annotation>
                            <xs:documentation> ; País ; O ; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:length value="2"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="PostcodeAddress" minOccurs="0">
                          <xs:annotation>
                            <xs:documentation> ; Endereço (Código postal); C ; </xs:documentation>
                          </xs:annotation>
                          <xs:complexType>
                            <xs:sequence>
                              <xs:element name="streetNumber" minOccurs="0">
                                <xs:annotation>
                                  <xs:documentation> ; Nº de porta; C; </xs:documentation>
                                </xs:annotation>
                                <xs:simpleType>
                                  <xs:restriction base="xs:string">
                                    <xs:maxLength value="70"/>
                                  </xs:restriction>
                                </xs:simpleType>
                              </xs:element>
                              <xs:element name="postcode">
                                <xs:annotation>
                                  <xs:documentation> ; Código postal ; O; </xs:documentation>
                                </xs:annotation>
                                <xs:simpleType>
                                  <xs:restriction base="xs:string">
                                    <xs:maxLength value="17"/>
                                  </xs:restriction>
                                </xs:simpleType>
                              </xs:element>
                              <xs:element name="country">
                                <xs:annotation>
                                  <xs:documentation> ; País ; O ; </xs:documentation>
                                </xs:annotation>
                                <xs:simpleType>
                                  <xs:restriction base="xs:string">
                                    <xs:length value="2"/>
                                  </xs:restriction>
                                </xs:simpleType>
                              </xs:element>
                            </xs:sequence>
                          </xs:complexType>
                        </xs:element>
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
            <xs:element name="ProcessedProducts" minOccurs="0" maxOccurs="999">
              <xs:annotation>
                <xs:documentation>5/7 (Anexo A) ; Produtos transformados; C; </xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="sequenceNumber">
                    <xs:annotation>
                      <xs:documentation> ; N.º de sequência ; O ; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:int">
                        <xs:maxInclusive value="99999"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="commodityCode">
                    <xs:annotation>
                      <xs:documentation> ; Código das mercadorias ; O ; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:length value="8"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="descriptionOfGoods">
                    <xs:annotation>
                      <xs:documentation> ; Designação das mercadorias ; O ; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="512"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="GoodsIdentification" minOccurs="0" maxOccurs="999">
                    <xs:annotation>
                      <xs:documentation>5/8 (Anexo A) ; Identificação das mercadorias  ; C; </xs:documentation>
                    </xs:annotation>
                    <xs:complexType>
                      <xs:sequence>
                        <xs:element name="sequenceNumber">
                          <xs:annotation>
                            <xs:documentation> ; N.º de sequência ; O ; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:int">
                              <xs:maxInclusive value="99999"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="identificationMeasureCode">
                          <xs:annotation>
                            <xs:documentation> ; Código da medida de identificação ; O ; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:int">
                              <xs:totalDigits value="1"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="identificationMeasureDescription">
                          <xs:annotation>
                            <xs:documentation> ; Descrição da medida de identificação ; O ; </xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:maxLength value="512"/>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
            <xs:element name="YieldRate" minOccurs="0" maxOccurs="999">
              <xs:annotation>
                <xs:documentation>5/5 (Anexo A) ; Taxa de rendimento; C; </xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="sequenceNumber">
                    <xs:annotation>
                      <xs:documentation> ; N.º de sequência ; O ; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:int">
                        <xs:maxInclusive value="99999"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="freeText">
                    <xs:annotation>
                      <xs:documentation> ; Texto livre; O ; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="512"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="CCEElements" minOccurs="0" maxOccurs="999">
        <xs:annotation>
          <xs:documentation>A1 01 000 000 ; Elementos CCE; C ; </xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="sequenceNumber">
              <xs:annotation>
                <xs:documentation> ; N.º de sequência; O ; </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:int">
                  <xs:maxInclusive value="999"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="supplierVATNumber">
              <xs:annotation>
                <xs:documentation>A1 01 001 000 ; NIF do fornecedor; O; </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:length value="11"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="invoiceNumber">
              <xs:annotation>
                <xs:documentation>A1 01 002 000 ; Nº da fatura; O; </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:maxLength value="35"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="invoiceIssueDate">
              <xs:annotation>
                <xs:documentation>A1 01 003 000 ; Data de emissão da fatura; O; </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:int">
                  <xs:totalDigits value="8"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="goodsDescription">
              <xs:annotation>
                <xs:documentation>A1 01 004 000 ; Descrição da mercadoria; O; </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:maxLength value="512"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="grossMass">
              <xs:annotation>
                <xs:documentation>A1 01 005 000 ; Massa bruta; O; </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:decimal">
                  <xs:maxInclusive value="9999999999999999.999999"/>
                  <xs:fractionDigits value="6"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="netMass">
              <xs:annotation>
                <xs:documentation>A1 01 006 000 ; Massa líquida; O; </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:decimal">
                  <xs:maxInclusive value="9999999999999999.999999"/>
                  <xs:fractionDigits value="6"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="amountInvoiced">
              <xs:annotation>
                <xs:documentation>A1 01 007 000 ; Montante faturado; O; </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:decimal">
                  <xs:maxInclusive value="9999999999999999.99"/>
                  <xs:fractionDigits value="2"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="Packaging" minOccurs="0" maxOccurs="99">
              <xs:annotation>
                <xs:documentation>A1 01 008 000 ; Volumes; C; </xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="sequenceNumber">
                    <xs:annotation>
                      <xs:documentation> ; N.º de sequência; O; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:int">
                        <xs:maxInclusive value="99999"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="typeOfPackages">
                    <xs:annotation>
                      <xs:documentation>A1 01 008 001 ; Tipo de volumes; O; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:int">
                        <xs:totalDigits value="2"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="numberOfPackages" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>A1 01 008 002 ; Nº de volumes; C; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:int">
                        <xs:maxInclusive value="99999999"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:element>
</xs:schema>
