cvc-complex-type.2.4.a:发现无效的内容(从元素“ FilerCategory”开始)

时间:2019-01-04 21:48:26

标签: xml xsd

因此,质量检查人员执行了一项工作来生成.xml,但是它通过以下消息使验证失败:

  

cvc-complex-type.2.4.a:发现无效内容,开头为   元素“ FilerCategory”。之一   '{“ urn:oecd:ties:fatca:v1”:ResidenceCountryCode,   “ urn:oecd:ties:fatca:v1”:GlobalIntermediaryIdentificationNumber,   “ urn:oecd:ties:fatca:v1”:SponsorName,   “ urn:oecd:ties:fatca:v1”:SponsorAddress}是预期的。文件没有   通过XML模式验证

但是,当我从插槽中取出相同的.xml并使用XMLSpy针对同一模式在本地对其进行验证时,它将通过验证

您知道什么会导致结果差异吗?

我的xml:

<?xml version="1.0" encoding="ISO-8859-1"?>
<FATCA_iFast xmlns:sfa="urn:oecd:ties:stffatcatypes:v1" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0" 
GovFileAgency="CRA" xsi:schemaLocation="urn:oecd:ties:fatca:v1 
FatcaIfast.xsd" xmlns="urn:oecd:ties:fatca:v1">
...
<FinancialInstitutionSponsor>
    <DocumentSpecification>
      <DocumentTypeCode>O</DocumentTypeCode>
      <DocumentReferenceIdentifier>CA-18-100001304RZ0007-SP-000015447</DocumentReferenceIdentifier>
    </DocumentSpecification>
    <FilerCategory>F607</FilerCategory>
    <ResidenceCountryCode>CA</ResidenceCountryCode>
    <GlobalIntermediaryIdentificationNumber>WYK0E0.00007.SF.124</GlobalIntermediaryIdentificationNumber>
    <SponsorName>
      <NameLine1Text>1832 Asset Management L.P.</NameLine1Text>
    </SponsorName>
    <SponsorAddress>
      <AddressLine1Text>4 ADELAIDE STREET</AddressLine1Text>
      <AddressLine2Text>SUITE 1</AddressLine2Text>
      <CityName>TORONTO</CityName>
      <ProvinceStateCodeOrName>ON</ProvinceStateCodeOrName>
      <CountryCode>CA</CountryCode>
      <PostalZipCode>M1M2M3</PostalZipCode>
    </SponsorAddress>
  </FinancialInstitutionSponsor>
  ...

我的xsd:

<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2016 (x64) (http://www.altova.com) by Satish Saravana (International Financial D) -->
<xsd:schema xmlns:ftc="urn:oecd:ties:fatca:v1" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:sfa="urn:oecd:ties:stffatcatypes:v1" 
xmlns:iso="urn:oecd:ties:isofatcatypes:v1" 
targetNamespace="urn:oecd:ties:fatca:v1" elementFormDefault="qualified" 
attributeFormDefault="unqualified" version="2.0">
<xsd:import namespace="urn:oecd:ties:isofatcatypes:v1" schemaLocation="isofatcatypes.xsd"/>
<xsd:import namespace="urn:oecd:ties:stffatcatypes:v1" schemaLocation="stffatcatypes_gen.xsd"/>
...
    <xsd:complexType name="P18FISponsorType">
    <xsd:all>
        <xsd:element name="DocumentSpecification" type="ftc:P18SponsorDocSpecType"/>
        <xsd:element name="FilerCategory" type="ftc:FilerCategorySponsorType"/>
        <xsd:element name="ResidenceCountryCode" type="sfa:Length2CountryCodeType" minOccurs="0"/>
        <xsd:element name="GlobalIntermediaryIdentificationNumber" type="sfa:GIINType"/>
        <xsd:element name="SponsorName" type="ftc:TwoLinedLength35NameType"/>
        <xsd:element name="SponsorAddress" type="ftc:RequiredCityCountryAddressType"/>
    </xsd:all>
</xsd:complexType>
...
<xsd:simpleType name="FilerCategorySponsorType">
    <xsd:restriction base="xsd:string">
        <xsd:length value="4"/>
        <xsd:enumeration value="F607">
            <xsd:annotation>
                <xsd:documentation>
                    F607 for Sponsoring Entity of a Sponsored foreign financial institution (FFI)
                </xsd:documentation>
            </xsd:annotation>
        </xsd:enumeration>
    </xsd:restriction>
</xsd:simpleType>
...

0 个答案:

没有答案