<TMPL_IF NAME="VALID">
  <TMPL_IF NAME="is_tentative">
    <h2 class="tentative_valid">This Page Is <em>Tentatively</em> Valid 
    <TMPL_VAR NAME="file_version" ESCAPE="HTML"></h2>
  <TMPL_ELSE>
    <h2 class="valid">This Page Is <TMPL_IF NAME="xmlwf_only">well-formed<TMPL_ELSE>Valid</TMPL_IF>
     <TMPL_VAR NAME="file_version" ESCAPE="HTML">!</h2>
  </TMPL_IF>
<TMPL_ELSE>
  <TMPL_IF NAME="fatal_error">
  <h2 id="results" class="invalid">Sorry! This document can not be checked.</h2>
  <TMPL_ELSE>  
  <h2 id="results" class="invalid">This page is <strong>not</strong> Valid <TMPL_VAR NAME="file_version" ESCAPE="HTML">!</h2>
  </TMPL_IF>  
</TMPL_IF>  


<TMPL_IF NAME="file_uri">
<form id="form" method="get" action="check">
  <table class="header">
    <tr>
    <th>Result:</th>
    <TMPL_IF NAME="VALID">
    <td colspan="2" class="valid">
      <TMPL_IF NAME="is_tentative">
        Tentatively passed validation
      <TMPL_ELSE>
        Passed validation
      </TMPL_IF>
    <TMPL_ELSE>
    <td colspan="2" class="invalid">
      Failed validation<TMPL_IF NAME="number_of_errors_is_1">, 1 Error</TMPL_IF><TMPL_IF NAME="number_of_errors_is_plural">, <TMPL_VAR NAME="valid_errors_num" ESCAPE="HTML"> Errors</TMPL_IF>
     <!-- this case where validation fails but no error is listed should never happen -->   
    </TMPL_IF>
    </td>
    </tr>
    <tr>
<TMPL_IF NAME="is_upload">
      <th>File:</th><td colspan="2"><TMPL_VAR NAME="file_uri" ESCAPE="HTML"></td>
<TMPL_ELSE>
      <th><label title="Address of Page to Validate" for="uri">Address</label>:</th>
      <td colspan="2"><input type="text" id="uri" name="uri" value="<TMPL_VAR NAME="file_uri" ESCAPE="HTML">" size="50" /></td>
</TMPL_IF>
    </tr>
<TMPL_IF NAME="opt_verbose">
    <tr><th>Modified:</th><td colspan="2"><TMPL_VAR NAME="file_modified" ESCAPE="HTML" DEFAULT="(undefined)"></td></tr>
    <tr><th>Server:</th><td colspan="2"><TMPL_VAR NAME="file_server" ESCAPE="HTML" DEFAULT="(undefined)"></td></tr>
    <tr><th>Size:</th><td colspan="2"><TMPL_VAR NAME="file_size" ESCAPE="HTML" DEFAULT="(undefined)"></td></tr>
    <tr><th>Content-Type:</th><td colspan="2"><TMPL_VAR NAME="file_contenttype" ESCAPE="HTML" DEFAULT="(undefined)"></td></tr>
</TMPL_IF>
<TMPL_IF NAME="opt_debug">
  <TMPL_LOOP NAME="debug">
    <tr><th><TMPL_VAR NAME="name" ESCAPE="HTML">:</th><td colspan="2"><TMPL_VAR NAME="value" ESCAPE="HTML" DEFAULT="(undefined)"></td></tr>
  </TMPL_LOOP>
</TMPL_IF>
<TMPL_IF NAME="is_upload">
    <tr><th>Encoding:</th><td colspan="2"><TMPL_VAR NAME="file_charset" ESCAPE="HTML"></td></tr>
    <tr><th>Doctype:</th><td colspan="2"><TMPL_VAR NAME="file_version" ESCAPE="HTML"></td></tr>
<TMPL_ELSE>
  <TMPL_IF NAME="file_charset">
    <tr>
      <th><label title="Character Encoding" for="charset">Encoding</label>:</th>
      <td><TMPL_VAR NAME="file_charset" ESCAPE="HTML"></td><td><TMPL_INCLUDE NAME="popup_charset.tmpl"></td>
    </tr>
  <TMPL_ELSE>
    <tr><th>Encoding:</th><td colspan="2"><TMPL_INCLUDE NAME="popup_charset.tmpl"></td></tr>
  </TMPL_IF>
  <TMPL_IF NAME="file_version">
    <tr>
      <th><label for="doctype" title="Document Type">Doctype</label>:</th>
      <td><TMPL_VAR NAME="file_version" ESCAPE="HTML"></td><td><TMPL_INCLUDE NAME="popup_doctype.tmpl"></td>
    </tr>
  <TMPL_ELSE>
    <tr><th>Doctype:</th><td colspan="2"><TMPL_INCLUDE NAME="popup_doctype.tmpl"></td></tr>
  </TMPL_IF>
</TMPL_IF>
<TMPL_IF NAME="root_element">
  <tr>
    <th>Root Element:</th>
    <td colspan="2"><TMPL_VAR NAME="root_element" ESCAPE="HTML"></td>
  </tr>
</TMPL_IF>
<TMPL_IF NAME="file_namespace">
    <tr>
      <th>Root Namespace:</th>
      <td colspan="2"><a href="<TMPL_VAR NAME="file_namespace" ESCAPE="HTML">"><TMPL_VAR NAME="file_namespace" ESCAPE="HTML"></a></td>
    </tr>
</TMPL_IF>
<TMPL_IF NAME="file_namespaces">
    <tr>
      <th>Other Namespaces</th>
      <td colspan="2">
        <ul>
          <TMPL_LOOP NAME="file_namespaces"><li><a href="<TMPL_VAR NAME="uri" ESCAPE="HTML">"><TMPL_VAR NAME="uri" ESCAPE="HTML"></a></li></TMPL_LOOP>
        </ul>
      </td>
    </tr>
</TMPL_IF>
  </table>

<TMPL_UNLESS NAME="is_upload">
        <fieldset id="revalidate_opts">
                 <legend>Options</legend>

    <table class="header">
      <tr>
        <td><input type="checkbox" value="1" id="ss" name="ss" 
<TMPL_IF NAME="opt_show_source">
	checked="checked"
</TMPL_IF>
		/><label title="Show Page Source" for="ss">Show&nbsp;Source</label></td>
              <td><input type="checkbox" value="1" id="outline" name="outline" 
<TMPL_IF NAME="opt_show_outline">
	checked="checked"
</TMPL_IF>
		/><label title="Show an Outline of the document" for="outline">Show&nbsp;Outline</label></td>
                <td><input type="radio" name="group" id="group_no" value="0" 
                        <TMPL_UNLESS NAME="opt_group_errors">
                        	checked="checked"
                        </TMPL_UNLESS>
                        /><label for="group_no">List Messages Sequentially</label> 
                        <input type="radio" name="group" id="group_yes" value="1"
                                <TMPL_IF NAME="opt_group_errors">
                                	checked="checked"
                                </TMPL_IF>
                                 /><label for="group_yes">Group Error Messages by type</label></td>
            </tr>
            <tr>
              <td><input type="checkbox" value="1" id="No200" name="No200"
<TMPL_IF NAME="opt_no200">
	checked="checked"
</TMPL_IF>
		/><label title="Validate also pages for which the HTTP status code indicates an error" for="No200">Validate&nbsp;error&nbsp;pages</label></td>
              <td><input type="checkbox" value="1" id="verbose" name="verbose"
<TMPL_IF NAME="opt_verbose">
	checked="checked"
</TMPL_IF>
		/><label title="Show Verbose Output" for="verbose">Verbose&nbsp;Output</label></td>
    		<td><input id="st" name="st" type="checkbox" value="1"
                        <TMPL_IF NAME="opt_show_tidy">
                        	checked="checked"
                        </TMPL_IF>
    		         /><label for="st">Clean up Markup with HTML Tidy</label></td>
            </tr>

    </table>
        <p class="moreinfo">
          <a href="docs/users.html#Options">Help</a> on the options is available.
        </p>
        <div id="revalidate_button" class="submit_button"><input type="submit" value="Revalidate" title="Validate this document again" /></div>
  </fieldset>
  
  
</TMPL_UNLESS>
</form>
</TMPL_IF>
