This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Since 7.0, HTML validation is too strict for me. I don't know how to get it right. In a page such as the following: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Title</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> </head> <body> <h1>Title</h1> <a wicket:id="address">Address</a><br/> </body> </html> I get 3 warnings in the editor: Warning: Skipping entity: [dtd] at line 2 column 63 Error: Bad value: Content-Type for attribute "http-equiv" on XHTML element "meta" at line 6 column 62 Fatal Error: Undeclared attribute prefix in wicket:id at line 11 column 23 How can I adapt to the new NetBeans version to avoid these errors while still getting HTML errors highlighted. I need the wicket:id and other attributes - these are essential for server side processing.
1) there has been some fixes to that area recently so now If co fix the code so it properly declares the wicket namespace: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd"> <head> <title>Title</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> </head> <body> <h1>Title</h1> <a wicket:id="address">Address</a><br/> </body> </html> I got only one error: Attribute "id" from namespace http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd is not allowed on XHTML element "a" at this point. I'll try to find some solution for you...
fixed in web-main#30ba9c1b1e7a You need to properly declared the namespace however so add xmlns:wicket="something" into the root tag in your files. The question is whether the namespaces filtering should be configurable via editor hints. Since I tend to think in most of the cases users wouldn't want their foreign content to cause validation errors I made it hardcoded. But I am open to every idea and opinion...
Integrated into 'main-golden', will be available in build *201012140001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/30ba9c1b1e7a User: Marek Fukala <mfukala@netbeans.org> Log: #193284 - HTML validation too strict
With the new behavior, the error is gone. Many thanks. My apologies - I don't underatand the warning on the line: <a wicket:id="address">Address</a><br/> "Warning; Content is being hidden from the validator due to namespace filtering at line 10 column 27 where 17 is the ">" from the div start tag. How does the name space of an attribute affect the content of the tag?
It's just a bit confusing message because it's not clear to what area it exactly belongs. In case of attributes the only attribute from the ignored namespace is ignored, the content of the tag is validated normally.
Please note I've filled Bug 193904 - html validation error annotations not always points to correct location in the code