Click here to Skip to main content
15,881,852 members
Please Sign up or sign in to vote.
2.00/5 (2 votes)
See more:
The element 'Organisation' in namespace 'xxx' has invalid child element 'TIN' in namespace ''. List of possible elements expected: 'TIN, Name' in namespace ''

But My XSD have the same element .
XML
<xsd:element name="TIN" type="sfa:TIN_Type" minoccurs="0" maxoccurs="unbounded" xmlns:xsd="#unknown">
</xsd:element>



My XML
XML
<fat>
    <message>
        <tin>12</tin>
        <name>US</name>
    </message>
</fat>


Kindly suggest me a solution for the same...

Thanks in advance
Posted
Updated 29-Oct-14 19:44pm
v6
Comments
Sergey Alexandrovich Kryukov 30-Oct-14 0:36am    
Due to today's rain, my access to your hard drive is somewhat limited. And all our wizards are presently on vacation.
—SA
PIEBALDconsult 30-Oct-14 0:42am    
Stop shouting at the rain.
Sergey Alexandrovich Kryukov 30-Oct-14 2:06am    
I don't, I just close my secret network for accessing the inquirer's hard drives.
—SA
PIEBALDconsult 30-Oct-14 0:40am    
Next time, please be sure to use the Encode and Code buttons so people can see your XML.
And we still need to see the document you are trying to validate.
Member 11191404 30-Oct-14 6:56am    
please the XML

<pre lang="xml">
<fatca_oecd xmlns="urn:oecd:ties:fatca:v1">
<messagespec>
<sendingcompanyin>123456789</sendingcompanyin>
<TransmittingCountry>12</TransmittingCountry>
<receivingcountry>US</receivingcountry>
<messagetype>FATCA</messagetype>
<messagerefid>20141007-17483701</messagerefid>
<reportingperiod>2013-12-31</reportingperiod>
<timestamp>2014-10-07T17:48:37</timestamp>
</messagespec>
<fatca>
<reportingfi>
<tin issuedby="">123456789</tin>
<name nametype="">Bank AG</name>
<address legaladdresstype="AddressFix">
<countrycode>CH</countrycode>
<addressfix>
<street>
</street>
<PostCode>3000</PostCode>
<city>Bern 7</city>
</addressfix>
</address>
<docspec>
<doctypeindic>1</doctypeindic>
<docrefid>20141007-17233701</docrefid>
</docspec>
</reportingfi>
<reportinggroup>
<accountreport>
<docspec>
<doctypeindic>1</doctypeindic>
<docrefid>20141007-17404555</docrefid>
</docspec>
<accountnumber>065600</accountnumber>
<accountholder>
<organisation>
<tin issuedby="">
</tin>
<name nametype="">
<firstname>
</firstname>
<lastname>Nr. 6907</lastname>
</name>
<address legaladdresstype="AddressFix">
<countrycode>CH</countrycode>
<addressfix>
<street>
</street>
<PostCode>
</PostCode>
<city>
</city>
</addressfix>
</address>
</organisation>
<acctholdertype>FATCA101</acctholdertype>
</accountholder>
<accountbalance currcode="CHF">695503.60</accountbalance>
</accountreport>
<accountreport>
<docspec>
<doctypeindic>FATCA1</doctypeindic>
<docrefid>20141007-17401256</docrefid>
</docspec>
<accountnumber>12760</accountnumber>
<accountholder>
<organisation>
<tin issuedby="">
</tin>
<name nametype="">
<firstname>
</firstname>
<lastname>Nr. 127</lastname>
</name>
<address legaladdresstype="AddressFix">
<countrycode>CH</countrycode>
<addressfix>
<street>
</street>
<PostCode>
</PostCode>
<city>
</city>
</addressfix>
</address>
</organisation>
<acctholdertype>FATCA121</acctholdertype>
</accountholder>
<accountbalance currcode="CHF">516738.40</accountbalance>
</accountreport>
<PoolReport>
<docspec>
<doctypeindic>1</doctypeindic>
<docrefid>20141007-17404558</docrefid>
</docspec>
<accountcount>2</accountcount>
<accountpoolreporttype>2</acco

1 solution

Ah, you have a default namespace -- <fatca_oecd xmlns="urn:oecd:ties:fatca:v1">
I suspected as much; they cause nothing but trouble.
Everything inside that element, including attributes, have that namespace and you will need to specify that in the XSD.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900