views:

320

answers:

2

How can I modify the conditions for which MyEclipse will throw up warning flags? I'd be happy to hear a generic solution, but here is my specific problem for the curious/if it turns out to be relevant:

<html xmlns="http://www.w3.org/1999/xhtml"&gt;
<wicket:panel>
<p>
<object type="text/html" width="750" height="360" wicket:id="htmlRendition"></object>
</wicket:panel>
</html>

causes warnings "Undefined attribute name (xmlns)," "Unknown tag (wicket:panel)" and "Undefined attribute name (wicket:id)." Oddly, there are no errors for most HTML files paired with Wicket Java files, only files with the format ClassName$InnerClassName.html.

+4  A: 

I use the following in my HTML files for Wicket:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;
<html xmlns="http://www.w3.org/1999/xhtml"  
      xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd"&gt;

I know some IDEs (IntelliJ) for example allow you to register a dtd to validate your xml files. This article looks to apply to XML documents, but perhaps HTML files work or can be configured to work similarly:

http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclipse.wst.xmleditor.doc.user/topics/cxmlcat.html

Scanningcrew
That's perfect, thanks. I was beginning to think that maybe I'd finally get a Tumbleweed.
Lord Torgamus
Thank you, Scanningcrew. I think this should be the right answer: to disable validation when in fact the HTML file is invalid is not the right solution. That would stop validation on all other files too, which I cannot believe is what you will want.
Kariem
+2  A: 

In the project properties, you can turn off different types of validation. For example, you can say that you don't want DTD validation of XML files, or HTML validation, etc.

Myeclipse example is here.

John
Ah, a generic answer, even better!
Lord Torgamus