title: xHTML markup checker integrated in Selenium
body: <p>Recently, I thought about how can I improve the quality of the projects, by using Continuous checking of xHTML source at Continuous Integration machine.</p>
  
  <p>Look, we have a project</p>
  
  <p><a href="http://sourceforge.net/projects/jtidy" rel="nofollow noreferrer">http://sourceforge.net/projects/jtidy</a> - jTidy
  JTidy is a Java port of HTML Tidy, a <code>HTML syntax checker</code> and pretty printer.</p>
  
  <p>It can validate the xHTML through a command-line interface. Or this tool can be extended in the way we need, because all source code are open.</p>
  
  <p>We can overwrite every Selenium validation method, such as assertTextPresent, or any other, so it will be calling the jTidy(by providing current state's HTML source), and if some errors or warnings will occur - it can be saved to Continuous Integration machine build's logs - so any project's related can see this info.</p>
  
  <p>We can not to rewrite all the Selenium methods, to integrate this call on every step, but to make this calls where we want(after DOM manupulations).</p>
  
  <p>Yes, we can use W3C markup validators for our sites, but there isn't any possibility to validate not initial state of page's source with this validators. After page creation, there might be lots of DOM manipulations which can produce markup errors/warnings - we can find it immediately with this scheme.</p>
  
  <p>One of the benefits of using Continuous integration is that you have quick feedback from code - how it integrates with existing code base, test whether unit and functional tests pass. Why not to get an additional useful info, such as instant xHTML markup validation status. The earlier we identify the problem, the easier to fix it.</p>
  
  <p>I haven't found anything on this theme in google yet.
  And want to know, what do you think about this idea?</p>