Registering DTD URLs

I have an xhtml 1.1 DOCTYPE declaration that is shown in red and gives a big ugly red square for my code inspection.  Particularly the DTD URL is shown in red.  Hovering the mouse over it gives me the message, "URI is not registered (Settings | IDE Settings | Resources)."  I went to Settings -> IDE Settings -> Resources and added the URI -> local file (which I downloaded) link.  But it's still showing in red.

How do I fix this?

Comment actions Permalink

Could you provide a code snippet?
What IDEA build are you using?

Comment actions Permalink

code snippet:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "">

I'm using IntelliJ IDEA 8.1 build #9732

Comment actions Permalink

When I follow the official W3C guideline found in their xhtml DTD for <html> attributes, intellij gives me a warning I suspect because intellij can't read the DTD.  Warnings are, "Attribute xmlns is not allowed here" and "Attribute xml:lang is not allowed here".  W3C DTD states:


<!-- For example, if you are using XHTML 1.1 directly, use the public
     identifier in the DOCTYPE declaration, with the namespace declaration
     on the document element to identify the default namespace:

       <?xml version="1.0"?>
       <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
       <html xmlns=""



Please sign in to leave a comment.