[Mono-list] Xml validation problem with xsd, date and timezone

Marc Bettex bettex at epsitec.ch
Thu Feb 9 16:20:09 UTC 2012

Thank you for you answer.

I don't use datetimes, I use simple dates without the time part. Well, I
also use datetimes at other places in the xml file and they work fine but my
problem is specifically with dates.

I use this format for the dates : yyyy-MM-ddzzz, which corresponds exactly
to the standard date type defined by the w3c in the link I wrote above and
that is referenced in my xsd file.

I can't use full datetimes, because what my program does is generate an xml
file for a third party and the third party has defined the xsd schema that I
must use. Once the xml document is generated with Linq to Xml, I check it
against the xsd to ensure that it is valid.

If I write the date without the timezone part, the validation succeeds. If I
add the timezone part, the validation fails. The validation succeeds in both
cases with .Net.

Unfortunately I canot simply drop the timezone part as it is required for
business reasons. For now, the only work around that I found is to skip the
validation step when the xml document is generated. But I don't really like
this solution, that's why I asked here in case someone has a solution for

View this message in context: http://mono.1490590.n4.nabble.com/Xml-validation-problem-with-xsd-date-and-timezone-tp4372806p4373376.html
Sent from the Mono - General mailing list archive at Nabble.com.

More information about the Mono-list mailing list