Validation bug in .NET Fx 1/1.1 

I wrote about a bug in validation engine of .NET Framework 1.0/1.1 a couple of weeks ago. There was a lot of posts/discussions/emails about this issue later on.

As Dare, Web Data Team PM, points out, it turns that this anomaly is manifesting itself through System.Xml.XmlValidaingReader, because System.Uri class has a problem. And System.Uri has a problem, because RFC 2396 does not support empty values in BNF notation of URI.

So, what I propose is that if you end up in a similiar situation that we did in a production environment and want to validate XML instances or XML digital signatures (which are likely to be prone to this problem too, depends on a generation engine) and current Whidbey release is not your cup of tea, THEN CHANGE THE SPECIFICATION/SCHEMA.

Simply change xsd:anyURI with xsd:string. It will help. :)

I know this is architecturally a bad idea. But there is no other way to get around this bug until Whidbey ships (unless you want to change platforms).

I'm glad that usability is driving the ambiguity choice in this case. I'm glad that decision has been made to support empty strings in System.Uri even though the spec is not clear. Some things are just more natural than others.

Categories:  XML
Thursday, 13 May 2004 19:37:30 (Central Europe Standard Time, UTC+01:00)  #    Comments

 

All comments require the approval of the site owner before being displayed.
Name
E-mail
Home page

Comment (HTML not allowed)  

Enter the code shown (prevents robots):

Live Comment Preview
Copyright © 2003-2024 , Matevž Gačnik
Recent Posts
RD / MVP
Feeds
RSS: Atom:
Archives
Categories
Blogroll
Legal

The opinions expressed herein are my own personal opinions and do not represent my company's view in any way.

My views often change.

This blog is just a collection of bytes.

Copyright © 2003-2024
Matevž Gačnik

Send mail to the author(s) E-mail