Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Open-source Java library for HTML5 validation?

Tags:

java

html

Is there any good open-source Java library for HTML5 validation? It would be great if it did CSS 3 validation too. JTidy has not been maintained for a while.

like image 352
Sualeh Fatehi Avatar asked Jul 11 '12 04:07

Sualeh Fatehi


2 Answers

The source code for both the W3C HTML and CSS validators is available, though only the CSS one is written in Java. The repo for validator.nu is here, that is written in Java.

However you should note that HTML5 validation is different to that for previous versions of HTML. Previous versions of HTML depended on a DTD and followed an SGML validation model, HTML5 no longer has a DTD or any link to SGML. It's possible that what you want is not an HTML5 validator, but an HTML5 linter.

like image 132
robertc Avatar answered Sep 30 '22 10:09

robertc


validator.nu is open source. No CSS parsing though.

like image 24
steveax Avatar answered Sep 30 '22 10:09

steveax