personal website: joe crawford. code. occasional comics. toy robots. bodysurfing. san diego. california. say hi.
since 1998

phpStorm: URI is not registered (Settings | Languages & Frameworks | Schemas and DTDs)

So I was looking through ancient HTML files last night, as one does, and noted this peculiar error in phpStorm around the DTD of one of the files:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 

phpStorm did not like this DOCTYPE. It reported to me:

URI is not registered (Settings | Languages & Frameworks | Schemas and DTDs)

I downloaded the dtd and entered the URI as the key and pointed to the downloaded dtd as a new schema in Schemas and DTDs.

That kind of worked, but then the <html> inspection was mad at me:

Element html must be declared

I added some related ent files referred to in the dtd.

I inspected where the other DTDs are kept, they’re in the platform-impl.jar file hidden inside ~/Library/Application Support/JetBrains/Toolbox/apps/PhpStorm/ch-0/213.5744.279/ but this also included a pile of other files so aping the format seemed like a nonstarter.

Ultimately the nuisance of the error for 20 year old HTML schema was not a profitable use of my time. But I have a soft spot for DTDs as tools to validate HTML. I remember hacking the HTML4 DTD so that I could validate against a DTD that included the attributes:


… which were necessary to make Microsoft Internet Explorer and Netscape Navigator render a page with no associated margins. This was useful for the pixel-perfect implementation work I did as a web integrator working with designers who wanted designs to be as close to perfect as possible.

Today, it’s trivial to add body { margin: 0; } to your stylesheet.

But I was creating web pages before stylesheets! When single-pixel GIFs ruled the day. The days of David Siegel’s Creating Killer Websites.

If anyone gets phpStorm to behave with these old DTDs please do let me know though.

posted this 1 month ago.
What else did he post in December 2021?

(Wednesday December 22nd 2021 at 9:24am)

Leave me a comment!

This site uses Akismet to reduce spam. Learn how your comment data is processed.