Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

As a best practice applications should reference dtds from local filesystem. Most sane data centers would have outbound (App->Internet) access locked down - only needed hosts/ports are allowed after the application developer specifically requests for it.


Sadly, if you use Python's batteries-included XML tools, this is virtually impossible to do. See http://bugs.python.org/issue2124 for some discussion.


Those tools suck.

lxml is better.


At the least, the program could use a singleton to fetch and cache the DTDs. To just pull it over the internet every time you need it is, ignoring the practical problems, just flat out wasteful.


Does the DTD have the right headers set to allow clients to cache it?


I'm not sure the situation with java.sun.com, but those provided by w3c do have a 90 days expiration (according to one of the links I've posted).

In all cases, since the DTDs are more or less versioned through their filenames, with quite a minimal rate of changes, caching them (even if not outright saving them forever) should be the default action.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: