XML验证错误:验证根目录没有可用的匹配全局声明

时间:2017-12-11 12:03:05

标签: xml

XSD的前几行

`<xs:schema xmlns="urn:iso:std:iso:20022:tech:xsd:camt.054.001.06" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="urn:iso:std:iso:20022:tech:xsd:camt.054.001.06">
        <xs:element name="Document" type="Document"> 
        </xs:element>
        <xs:complexType name="AccountIdentification4Choice">
            <xs:annotation>
                <xs:documentation source="Name" xml:lang="EN">AccountIdentification4Choice</xs:documentation>
                <xs:documentation source="Definition" xml:lang="EN">Specifies the unique identification of an account as assigned by the account servicer.</xs:documentation>
            </xs:annotation>
            <xs:choice>
                <xs:element name="IBAN" type="IBAN2007Identifier">
                    <xs:annotation>
                        <xs:documentation source="Name" xml:lang="EN">IBAN</xs:documentation>
                        <xs:documentation source="Definition" xml:lang="EN">International Bank Account Number (IBAN) - identifier used internationally by financial institutions to uniquely identify the account of a customer. Further specifications of the format and content of the IBAN can be found in the standard ISO 13616 "Banking and related financial services - International Bank Account Number (IBAN)" version 1997-10-01, or later revisions.</xs:documentation>
                    </xs:annotation>
                </xs:element>
                <xs:element name="Othr" type="GenericAccountIdentification1">
                    <xs:annotation>
                        <xs:documentation source="Name" xml:lang="EN">Other</xs:documentation>
                        <xs:documentation source="Definition" xml:lang="EN">Unique identification of an account, as assigned by the account servicer, using an identification scheme.</xs:documentation>
                    </xs:annotation>
                </xs:element>
            </xs:choice>
        </xs:complexType>`

当我用这个验证我的XML文件时,我得到了主题中提到的错误。不确定是什么问题。我认为这是非常基本的,但不确定它是什么。

XML的前几行

`<?xml version="1.0" encoding="UTF-8"?>
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:camt.054.001.02" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:iso:std:iso:20022:tech:xsd:camt.054.001.02 camt.054.001.02.xsd">
  <BkToCstmrDbtCdtNtfctn>
    <GrpHdr>
      <MsgId>00ZW0YFOV2H1KKWA0003FLAALFALFV5328U</MsgId>
      <CreDtTm>2017-12-06T21:56:02</CreDtTm>
      <MsgRcpt>
        <Id>
          <OrgId>
            <Othr>
              <Id>F704863Z</Id>
              <Issr>EBICS</Issr>
            </Othr>
          </OrgId>
        </Id>
      </MsgRcpt>
      <MsgPgntn>
        <PgNb>1</PgNb>
        <LastPgInd>true</LastPgInd>
      </MsgPgntn>
    </GrpHdr>
    <Ntfctn>
      <Id>00ZW0YFOV2H1KKWA0003FLAALFALFV5328U</Id>
      <CreDtTm>2017-12-06T21:53:28</CreDtTm>
      <Acct>`

0 个答案:

没有答案