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?

3 comments
Comment actions Permalink

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


0
Comment actions Permalink

code snippet:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">



I'm using IntelliJ IDEA 8.1 build #9732


0
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:

 #inspection/HtmlUnknownAttribute 

<!-- 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"
                             "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
       <html xmlns="http://www.w3.org/1999/xhtml"
             xml:lang="en">
       ...
       </html>

     Revisions:
     (none)
-->



0

Please sign in to leave a comment.