In .NET it turns out that if you load an XML document into XmlDocument, i.e.
then all of the DTD's are pulled in and parsed, even if you
do not pass the XmlDocument to a validating reader. If it can't
find the DTD's then it throws an exception. Not the behaviour
I expected. The way to stop this isn't obvious at first either, but
this works:
XmlDocument doc = new XmlDocument();
doc.Load("test.html");
The reason I know this is because I was trying to
load an XHTML 1.1 document into XmlDocument and it
kept failing. It appears that the XmlResolver can't
handle relative path names for included DTD's, and
guess what, the official DTD for XHTML 1.1 loads other
DTD's and does so with a relative URL in some cases.
You will have to wait a while to find out why I was trying to load an XHTML document into XmlDocument...
XmlDocument doc = new XmlDocument();
doc.XmlResolver = null;
doc.Load("test.html");
If you are interested in how Aggie works, I have posted a short Theory Of Operation for Aggie.
It seems like every day I run into one more reason to move to Italy. Recently it was this wired article, and now Ben Hammersley is moving there.
NPR doesn't just suck. They are brutally stupid too. [Via Boing Boing]