<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>21831</bug_id>
          
          <creation_ts>2013-04-25 19:29:58 +0000</creation_ts>
          <short_desc>[HTML] editorial: 12.2: error handling for parse errors</short_desc>
          <delta_ts>2013-06-12 22:28:38 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>HTML</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Dyck">jmdyck</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>ian</cc>
    
    <cc>mike</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>86810</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Dyck">jmdyck</who>
    <bug_when>2013-04-25 19:29:58 +0000</bug_when>
    <thetext>12.2 &quot;Parsing HTML documents&quot; says:

    The error handling for parse errors is well-defined: user agents must
    either act as described below when encountering such problems, or must
    abort processing at the first error that they encounter for which they
    do not wish to apply the rules described in this specification.

But it&apos;s not clear what &quot;act as described below&quot; refers to. The subsequent paragraphs in the section apply only to conformance checkers.

Similarly, it&apos;s not clear what &quot;the rules described in this specification
[for parse errors]&quot; are.

My guess is that they&apos;re referring to phrasing such as:
    Parse error. Emit the current input character as a character token.
(in 12.2.4.1 Data state). That is, if the user agent arrives at this point,
it can either &quot;abort processing&quot; (though it&apos;s not entirely clear what that
entails), or it can &quot;act as described&quot; (i.e. emit the current input character
as a character token), and proceed as if nothing untoward had happened.

(And while a conformance checker can do either, it also has a duty to report
the error, modulo the existence of other errors. Other user agents don&apos;t appear
to have even the /option/ to report errors, though presumably they do have that
option, e.g. via an Error Console.)

However, there are also places where the spec simply identifies a parse error,
without any accompanying [recovery] behaviour. E.g.:
    12.2.2.4 Preprocessing the input stream
        Any occurrences of any characters in the ranges ... are parse errors.
    12.2.4 Tokenization
        When an end tag token is emitted with attributes, that is a parse error.
If a user agent encounters these situations, and doesn&apos;t want to &quot;abort
processing&quot;, what can/must it do?

In summary, this is a request to make all these points clearer.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88765</commentid>
    <comment_count>1</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-06-05 21:08:57 +0000</bug_when>
    <thetext>Good point. I&apos;ve tried to fix it. Let me know if the new text is sufficient.

I&apos;ve not mentioned that any UA can report stuff to the user, because I don&apos;t know what it would mean for us to not implicitly allow that already.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88767</commentid>
    <comment_count>2</comment_count>
    <who name="">contributor</who>
    <bug_when>2013-06-05 21:09:19 +0000</bug_when>
    <thetext>Checked in as WHATWG revision r7912.
Check-in comment: Try to clarify how UAs can abort at parse errors.
http://html5.org/tools/web-apps-tracker?from=7911&amp;to=7912</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>