XML Fails validation

My XML fails validation.

My root element:

<UNHCR_RRF xmlns="http://tempuri.org/ElectronicRRF.xsd" xmlns:dt="urn:schemas-microsoft-com:datatypes" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://tempuri.org/ElectronicRRF.xsd UNHCR_RRF.xsd">

When I validate, I get the following errors:

Error: The 'urn:schemas-microsoft-com:datatypes:dt' attribute is not declared.
At: (Line: 14, Column: 24)

The offending line:

<DateofBirthEstimate dt:dt="boolean">0</DateofBirthEstimate>

I'm using the NMatrix Schematron.NET Test GUI but the same thing happens if I use XmlValidatingReader. The namespace looks correct. Can someone tell me what is wrong?

TPM

[1126 byte] By [TomMorgan] at [2008-3-7]
# 1
The XmlValidatingReader does not automatically detect XDR validation. But if you set the following flag it will work.

reader.ValidationType = ValidationType.XDR;

ChrisLovett at 2007-9-9 > top of Msdn Tech,.NET Development,XML and the .NET Framework...
# 2
Thanks Chris, that was it.
TomMorgan at 2007-9-9 > top of Msdn Tech,.NET Development,XML and the .NET Framework...

.NET Development

Site Classified