W3C home > Mailing lists > Public > www-validator-cvs@w3.org > February 2005

validator/share/templates/en_US warnings.tmpl,NONE,1.1 invalid.tmpl,1.8,1.9 result.tmpl,1.5,1.6 valid.tmpl,1.8,1.9

From: Terje Bless <link@dev.w3.org>
Date: Mon, 14 Feb 2005 01:46:10 +0000
To: www-validator-cvs@w3.org
Message-ID: <E1D0VJS-0003MT-D2@lionel-hutz.w3.org>

Update of /sources/public/validator/share/templates/en_US
In directory hutz:/tmp/cvs-serv12854/share/templates/en_US

Modified Files:
	invalid.tmpl result.tmpl valid.tmpl 
Added Files:
	warnings.tmpl 
Log Message:
Templateify warnings for result pages.


Index: valid.tmpl
===================================================================
RCS file: /sources/public/validator/share/templates/en_US/valid.tmpl,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- valid.tmpl	5 Feb 2005 04:08:31 -0000	1.8
+++ valid.tmpl	14 Feb 2005 01:46:08 -0000	1.9
@@ -8,16 +8,6 @@
     <dt><a href="http://www.w3.org/2001/06tips/">Tip Of The Day</a>:</dt>
     <dd><a href="<TMPL_VAR NAME="tip_uri" ESCAPE="HTML">"><TMPL_VAR NAME="tip_slug"></a></dd>
   </dl>
-<TMPL_IF NAME="file_warnings">
-  <dl id="warnings">
-<TMPL_LOOP NAME="file_warnings">
-    <dt><TMPL_VAR NAME="Title" ESCAPE="HTML"></dt>
-    <dd>
-      <TMPL_VAR NAME="Message">
-    </dd>
-</TMPL_LOOP>
-  </dl>
-</TMPL_IF>
   <p>
 <TMPL_IF NAME="is_upload">
     The uploaded document "<TMPL_VAR NAME="file_uri" ESCAPE="HTML">"

Index: result.tmpl
===================================================================
RCS file: /sources/public/validator/share/templates/en_US/result.tmpl,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- result.tmpl	7 Sep 2004 23:57:18 -0000	1.5
+++ result.tmpl	14 Feb 2005 01:46:08 -0000	1.6
@@ -5,7 +5,7 @@
         <TMPL_INCLUDE name="jumpbar.tmpl">
         <TMPL_INCLUDE NAME="table.tmpl">
       </div><!-- end of "head" -->
-
+      <TMPL_INCLUDE NAME="warnings.tmpl">
       <TMPL_IF NAME="VALID">
         <TMPL_INCLUDE NAME="valid.tmpl">
       <TMPL_ELSE>

--- NEW FILE: warnings.tmpl ---
<dl id="warnings">

<TMPL_IF NAME="W01">
  <dt id="W01">Missing "<code>charset</code>" attribute for "<code><TMPL_VAR NAME="W01_ct" ESCAPE="HTML"></code>" document.</dt>
  <dd>
    <p>
      The HTTP <code>Content-Type</code> header
      (<code><TMPL_VAR NAME="W01_ct" ESCAPE="HTML"></code>) sent by your web
      <TMPL_IF NAME="W01_upload">browser<TMPL_ELSE>server</TMPL_IF>
      (<code><TMPL_VAR NAME="W01_agent" ESCAPE="HTML"></code>) did not contain a
      "<code>charset</code>" parameter, but the Content-Type was one of
      the XML <code>text/*</code> sub-types.
    </p>
    <p>
      The relevant specification
      (<a href="http://www.ietf.org/rfc/rfc3023.txt">RFC 3023</a>)
      specifies a strong default of "<code>us-ascii</code>" for
      such documents so we will use this value regardless of any encoding you
      may have indicated elsewhere.
    <p>
      If you would like to use a different encoding, you should arrange to have
      your <TMPL_IF NAME="W01_upload">browser<TMPL_ELSE>server</TMPL_IF> send
      this new encoding information.
    </p>
  </dd>
</TMPL_IF>
<TMPL_IF NAME="W02">
  <dt id="W02">No Character Encoding Found!</dt>
  <dd>
    Falling back to "<code><TMPL_VAR NAME="W02_charset" ESCAPE="HTML"></code>"
    (<a href="docs/users.html#fbc">explain...</a>).
  </dd>
</TMPL_IF>
<TMPL_IF NAME="W03">
  <dt id="W03">Character Encoding Override in effect!</dt>
  <dd>
    The detected character encoding "<code><TMPL_VAR NAME="W03_use" ESCAPE="HTML"></code>"
    has been suppressed and "<code><TMPL_VAR NAME="W03_opt" ESCAPE="HTML"></code>" used instead.
  </dd>
</TMPL_IF>
<TMPL_IF NAME="W04">
  <dt id="W04">No Character Encoding Found! Falling back to <code>UTF-8</code>.</dt>
  <dd>
    <p>
      I was not able to extract a character encoding labeling from any of
      the valid sources for such information. Without encoding information
      it is impossible to reliably validate the document. I'm falling back
      to the "UTF-8" encoding and will attempt to perform the validation,
      but this is likely to fail for all non-trivial documents.
    </p>
  <TMPL_IF NAME="opt_verbose">
    <p>The sources I tried to find encoding information include:</p>
    <ul>
      <li>The HTTP Content-Type field.</li>
      <li>The XML Declaration.</li>
      <li>The HTML "META" element.</li>
    </ul>
    <p>
      And I even tried to autodetect it using the algorithm defined in
      <a href="http://www.w3.org/TR/REC-xml#sec-guessing">Appendix F of
        the XML 1.0 Recommendation</a>.
    </p>
    <p>
      Since none of these sources yielded any usable information, I will not be
      able to reliably validate this document. Sorry. Please make sure you
      specify the character encoding in use.
    </p>
    <p class="note">
      Specifying a character encoding is normally done in the web server
      configuration file or administration program. The <a
        href="http://www.w3.org/"><abbr
          title="World Wide Web Consortium">W3C</abbr></a> <a
        href="http://www.w3.org/International/"><abbr
          title="Internationalization">I18N</abbr> Activity</a> has collected
        <a href="http://www.w3.org/International/O-HTTP-charset"
           title="A Few Tips On How To Specify The Character Encoding">a few
          tips on how to do this</a> in popular web server implementations.
    </p>
    <TMPL_INCLUDE NAME="iana_charset_blurb.tmpl">
    <p>
      To quickly check whether the document would validate after addressing
      the missing character encoding information, you can use the "Encoding"
      form control (accesskey "2") earlier in the page to force an encoding
      override to take effect. "iso-8859-1" (Western Europe and North America)
      and "utf-8" (Universal, but not commonly used in legacy documents) are
      common encodings if you are not sure what encoding to choose.
    </p>
  <TMPL_ELSE>
    <p>So what should I do? <a href="docs/help.html#faq-charset">Tell me more...</a></p>
  </TMPL_IF>
  </dd>
</TMPL_IF>
<TMPL_IF NAME="W05">
  <dt id="W05"><code>DOCTYPE</code> Override in effect!</dt>
  <dd>
    Any DOCTYPE Declaration in the document has been suppressed and the DOCTYPE
    for "<code><TMPL_VAR NAME="W05_dtd" ESCAPE="HTML"></code>" inserted instead. The document
    will not be Valid until you alter the source file to reflect this new DOCTYPE.
  </dd>
</TMPL_IF>
<TMPL_IF NAME="W06">
  <dt id="W06">Unable to Determine Parse Mode!</dt>
  <dd>Falling back to SGML mode.</dd>
</TMPL_IF>
<TMPL_IF NAME="W07">
  <dt id="W07">Contradictory Parse Modes Detected!</dt>
  <dd>
    The MIME Media Type (<code><TMPL_VAR NAME="W07_mime" ESCAPE="HTML"></code>)
    indicated parse mode should be <TMPL_VAR NAME="W07_ct" ESCAPE="HTML">, but the
    <code>DOCTYPE</code> Declaration indicates <TMPL_VAR NAME="W07_dtd" ESCAPE="HTML"> mode.
    Using <TMPL_VAR NAME="W07_ct" ESCAPE="HTML"> mode based on <code>Content-Type</code> header.
  </dd>
</TMPL_IF>
<TMPL_IF NAME="W08">
  <dt id="W08">Unknown Document Type and Parse Mode!</dt>
  <dd>
    The MIME Media Type (<code><TMPL_VAR NAME="W08_mime" ESCAPE="HTML"></code>) for
    this document is used to serve both SGML and XML based documents, and
    no <code>DOCTYPE</code> Declaration was found to disambiguate it.
    Parsing will continue in SGML mode and with a fallback <code>DOCTYPE</code>
    similar to HTML 4.01 Transitional.
  </dd>
</TMPL_IF>
<TMPL_IF NAME="W09">
  <dt id="W09"><code>DOCTYPE</code> Fallback in effect!</dt>
  <dd>
    The DOCTYPE Declaration was not recognized or is missing. This
    probably means that the Formal Public Identifier contains a spelling
    error, or that the Declaration is not using correct syntax. Validation
    has been performed using a default "fallback" Document Type Definition
    that closely resembles $dtd, but the document will not
    be Valid until you have corrected the problem with the DOCTYPE
    Declaration.
  </dd>
</TMPL_IF>
<TMPL_IF NAME="W10">
  <dt id="W10">Unknown Namespace Found</dt>
  <dd>
    Unknown namespace "<code><TMPL_VAR NAME="W10_ns" ESCAPE="HTML"></code>" for
    <TMPL_VAR NAME="W10_type" ESCAPE="HTML"> document!",
  </dd>
</TMPL_IF>
<TMPL_IF NAME="W11">
  <dt id="W11">Namespace Found in non-XML Document</dt>
  <dd>
    Namespace "<code><TMPL_VAR NAME="W11_rns" ESCAPE="HTML"></code>" found, but document
    type is not XML!
  </dd>
</TMPL_IF>
<TMPL_IF NAME="W12">
  <dt id="W12">No Namespace Found</dt>
  <dd>
    No Namespace was found, but document type requires one to be present!
  </dd>
</TMPL_IF>
<TMPL_IF NAME="W13">
  <dt id="W13"><code>DOCTYPE</code> Override in effect!</dt>
  <dd>
    The detected DOCTYPE Declaration "<code><TMPL_VAR NAME="W13_org" ESCAPE="HTML"></code>"
    has been suppressed and the DOCTYPE for
    "<code><TMPL_VAR NAME="W13_new" ESCAPE="HTML"></code>" inserted instead, but even if no
    errors are shown below the document will not be Valid until you update
    it to reflect this new DOCTYPE.
  </dd>
</TMPL_IF>
<TMPL_IF NAME="W14">
  <dt id="W14">No <code>DOCTYPE</code> Found!</dt>
  <dd>
    Falling back to HTML 4.01 Transitional.
    (<a href="docs/users.html#fbd">explain...</a>)
  </dd>
</TMPL_IF>
<TMPL_IF NAME="W15">
  <dt id="W15"><code>DOCTYPE</code> Override in effect!</dt>
  <dd>
    The DOCTYPE Declaration for "<TMPL_VAR NAME="W15_dtd" ESCAPE="HTML">" has been inserted
    at the start of the document, but even if no errors are shown below the
    document will not be Valid until you add the new DOCTYPE Declaration.
  </dd>
</TMPL_IF>
<TMPL_IF NAME="W16">
  <dt id="W16">No DOCTYPE Found! Falling Back to <TMPL_VAR NAME="W16_dtd" ESCAPE="HTML">.</dt>
  <dd>
    <p>
      A DOCTYPE Declaration is mandatory for most current markup languages
      and without one it is impossible to reliably validate this document.
      I am falling back to "<TMPL_VAR NAME="W16_dtd" ESCAPE="HTML">" and will attempt to
      validate the document anyway, but this is very likely to produce
      spurious error messages for most non-trivial documents.
    </p>
  <TMPL_IF NAME="opt_verbose">
    <TMPL_INCLUDE NAME="doctype_spiel.tmpl">
    <p>
      The W3C QA Activity maintains a <a
        href="http://www.w3.org/QA/2002/04/valid-dtd-list.html">List of
          Valid Doctypes</a> that you can choose from, and the <acronym
        title="Web Design Group">WDG</acronym> maintains a document on
      "<a href="http://htmlhelp.com/tools/validator/doctype.html">Choosing
         a DOCTYPE</a>".
    </p>
  <TMPL_ELSE>
    <p>
      So what should I do?
      <a href="docs/help.html#faq-doctype">Tell me more...</a>
    </p>
  </TMPL_IF>
</TMPL_IF>
<TMPL_IF NAME="W17">
  <dt id="W17">No Character Encoding detected!</dt>
  <dd>
    To ensure correct validation, processing, and display, it is important
    that the character encoding is properly labeled.
    <a href="http://www.w3.org/International/O-charset.html">More
    information...</a>
  </dd>
</TMPL_IF>
<TMPL_IF NAME="W18">
  <dt id="W18">Character Encoding mismatch!</dt>
  <dd>
    The character encoding specified in the HTTP header
      (<code><TMPL_VAR NAME="W18_http" ESCAPE="HTML"></code>)
    is different from the value in the XML declaration
      (<code><TMPL_VAR NAME="W18_xml" ESCAPE="HTML"></code>).
    I will use the value from the HTTP header
      (<code><TMPL_VAR NAME="W18_use" ESCAPE="HTML"></code>).
  </dd>
</TMPL_IF>
<TMPL_IF NAME="W19">
  <dt id="W19">Character Encoding mismatch!</dt>
  <dd>
    The character encoding specified in the HTTP header
      (<code><TMPL_VAR NAME="W19_http" ESCAPE="HTML"></code>)
    is different from the value in the <code>&lt;meta&gt;</code> element
    (<code><TMPL_VAR NAME="W19_meta" ESCAPE="HTML"></code>). I will use the value from the
    HTTP header (<code><TMPL_VAR NAME="W19_use" ESCAPE="HTML"></code>) for this validation.
  </dd>
</TMPL_IF>
<TMPL_IF NAME="W20">
  <dt id="W20">Character Encoding mismatch!</dt>
  <dd>
    The character encoding specified in the XML declaration
    (<code><TMPL_VAR NAME="W20_xml" ESCAPE="HTML"></code>)
    is different from the value in the <code>&lt;meta&gt;</code> element
    (<code><TMPL_VAR NAME="W20_meta" ESCAPE="HTML"></code>). I will use the value from the
    XML declaration (<code><TMPL_VAR NAME="W20_xml" ESCAPE="HTML"></code>) for this validation.
  </dd>
</TMPL_IF>
<TMPL_IF NAME="W21">
  <dt id="W21">Byte-Order Mark found in UTF-8 File.</dt>
  <dd>
    The Unicode Byte-Order Mark (BOM) in UTF-8 encoded files is known to cause
    problems for some text editors and older browsers. You may want to consider
    avoiding its use until it is better supported.
  </dd>
</TMPL_IF>

<TMPL_IF NAME="W@@">
  <dt id="W@@"></dt>
  <dd>
  </dd>
</TMPL_IF>

</dl><!-- End of "warnings". -->






Index: invalid.tmpl
===================================================================
RCS file: /sources/public/validator/share/templates/en_US/invalid.tmpl,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- invalid.tmpl	15 Jan 2005 15:20:39 -0000	1.8
+++ invalid.tmpl	14 Feb 2005 01:46:08 -0000	1.9
@@ -1,15 +1,5 @@
   <div id="result">
     <h2 id="results" class="invalid">This page is <strong>not</strong> Valid <TMPL_VAR NAME="file_version" ESCAPE="HTML">!</h2>
-<TMPL_IF NAME="file_warnings">
-    <dl id="warnings">
-<TMPL_LOOP NAME="file_warnings">
-      <dt><TMPL_VAR NAME="Title" ESCAPE="HTML"></dt>
-        <dd>
-          <TMPL_VAR NAME="Message">
-        </dd>
-</TMPL_LOOP>
-      </dl>
-</TMPL_IF>
 <TMPL_IF NAME="is_xml">
     <p>
       Below are the results of checking this document for <a
Received on Monday, 14 February 2005 01:46:16 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 26 April 2012 12:54:48 GMT