[Going ever further off topic....] On Sat, 18 Dec 2010 20:52:09 -0500 John Sanda <john.sa...@gmail.com> wrote: > On Sat, Dec 18, 2010 at 3:10 PM, Alyssa Kwan <alyssa.c.k...@gmail.com>wrote: > > I'd like to unit test my html output for well-formedness. What's an > > easy way to test it for HTML5 validity? Are there good Clojure libs > > for this? I only need to check for validity, not parse. > You might want to a look at http://xmlunit.sourceforge.net/. I've neither > used it with Clojure nor for HTML validation, but I have used a good bit for > general purpose XML validation. I was pretty happy with it.
That (well, something like it) was my initial thought. But there's no schema/DTD for HTML5, so you can't use a traditional validator like the Validator class to get even that much of a check. For that matter, HTML5 includes things that can't be expressed in SGML, much less XML. The spec explicitly states that a conformance checker that just does a DTD-based validation is not a conforming conformance checker according to the specification. This may be why there's no DTD yet: the spec is under development, so providing a DTD would just encourage people to use DTD-based validators instead of writing the custom code required to properly check conformance. Hopefully, when it's finished they'll publish a DTD, so conformance checkers can be written that assume a valid document. <mike -- Mike Meyer <m...@mired.org> http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant, email for more information. O< ascii ribbon campaign - stop html mail - www.asciiribbon.org -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en