You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Lucio Crusca <lu...@sulweb.org> on 2012/10/02 14:45:11 UTC
HTML validation
Hello *,
I'm new to wicket. I use NetBeans 7.2/Linux.
I'm trying to follow some examples, but NB doesn't validate wicket HTML files.
Now I could live without validating them. However the NetBeans editor
highlights syntax errors and that's a desirable feature, but it becomes an
annoyance if any "wicket" string is seen as an error.
For example, this file I copied from wicket examples:
<html xmlns:wicket="http://wicket.apache.org">
<head>
<title>Wicket Examples - Authentication</title>
<link rel="stylesheet" type="text/css" href="style.css"/>
</head>
<body>
<span wicket:id="mainNavigation"/>
<wicket:child />
</body>
</html>
scores 3 errors in Netbeans plus some warnings.
By the way, the w3c validator [1], fed with the same HTML files, reports the
same errors of the Netbeans editor and then some. Both autodetect wicket HTML
files as HTML 5.
If I force them as XHTML 1.0 Transitional, by adding
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
at the top and
xmlns="http://www.w3.org/1999/xhtml"
in the html tag, w3c validator finds "only" two errors and NetBeans takes it
showing only a couple of warnings. This could be an acceptable workaround for
me, but I wonder if I'm doing something basically wrong.
Is there a way to write valid HTML in wicket?
[1]. http://validator.w3.org/check
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: HTML validation
Posted by Lucio Crusca <lu...@sulweb.org>.
In data martedì 2 ottobre 2012 15:01:28, Martin Grigorov ha scritto:
> Hi,
>
> I use Intellij IDEA and here is what I did to suppress those "errors":
> File -> Settings -> DTDs and Schemas -> External DTDs and Schemas ->
> Add button (+) -> URI = http://wicket.apache.org , Location:
> /path/to/wicket-core.jar#META-INF/wicket-1.5.xsd
Thanks, it was actually a farly logic solution... however in Netbeans the
dialog window that appears after clicking "DTDs and Schemas"/"Add Local DTD or
Schema" looks like this:
http://www.virtual-bit.com/download/sparsi/adddtdschema.png
What "PUBLIC ID" or "SYSTEM ID" should I enter?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: HTML validation
Posted by Martin Grigorov <mg...@apache.org>.
Hi,
I use Intellij IDEA and here is what I did to suppress those "errors":
File -> Settings -> DTDs and Schemas -> External DTDs and Schemas ->
Add button (+) -> URI = http://wicket.apache.org , Location:
/path/to/wicket-core.jar#META-INF/wicket-1.5.xsd
Now you should find how to do this in Netbeans.
Good luck!
On Tue, Oct 2, 2012 at 3:45 PM, Lucio Crusca <lu...@sulweb.org> wrote:
> Hello *,
>
> I'm new to wicket. I use NetBeans 7.2/Linux.
>
> I'm trying to follow some examples, but NB doesn't validate wicket HTML files.
> Now I could live without validating them. However the NetBeans editor
> highlights syntax errors and that's a desirable feature, but it becomes an
> annoyance if any "wicket" string is seen as an error.
>
> For example, this file I copied from wicket examples:
>
> <html xmlns:wicket="http://wicket.apache.org">
> <head>
> <title>Wicket Examples - Authentication</title>
> <link rel="stylesheet" type="text/css" href="style.css"/>
> </head>
> <body>
> <span wicket:id="mainNavigation"/>
> <wicket:child />
> </body>
> </html>
>
> scores 3 errors in Netbeans plus some warnings.
>
> By the way, the w3c validator [1], fed with the same HTML files, reports the
> same errors of the Netbeans editor and then some. Both autodetect wicket HTML
> files as HTML 5.
>
> If I force them as XHTML 1.0 Transitional, by adding
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>
> at the top and
>
> xmlns="http://www.w3.org/1999/xhtml"
>
> in the html tag, w3c validator finds "only" two errors and NetBeans takes it
> showing only a couple of warnings. This could be an acceptable workaround for
> me, but I wonder if I'm doing something basically wrong.
>
> Is there a way to write valid HTML in wicket?
>
> [1]. http://validator.w3.org/check
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org