<?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>18710</bug_id>
          
          <creation_ts>2012-08-27 18:59:32 +0000</creation_ts>
          <short_desc>[Templates]: Trigger parse errors when template content does not match the template context.</short_desc>
          <delta_ts>2015-08-28 07:39:27 +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>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</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>
          
          <blocked>15476</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Tony Ross [MSFT]">tross</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>annevk</cc>
    
    <cc>hayato</cc>
    
    <cc>mike</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>72835</commentid>
    <comment_count>0</comment_count>
    <who name="Tony Ross [MSFT]">tross</who>
    <bug_when>2012-08-27 18:59:32 +0000</bug_when>
    <thetext>Functionally we want templates to be declared anywhere and be able to declare anything. That said, I suspect this behavior could confuse some authors who mistakenly put content in a template that would normally be inappropriate for the context in which the template has been declared (e.g. &lt;table&gt;&lt;template&gt;&lt;div&gt;).

To help authors identify these scenarios (which are likely mistakes), I suggest we consider including context-sensitive parse errors. Functionally everything would still parse the same, but we would trigger an error for unexpected content (like &lt;table&gt;&lt;template&gt;&lt;div&gt;). We would not trigger these new errors for templates declared within &lt;head&gt; regardless of content.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>121616</commentid>
    <comment_count>1</comment_count>
    <who name="Hayato Ito">hayato</who>
    <bug_when>2015-07-06 07:16:19 +0000</bug_when>
    <thetext>Changing the category:
  From: WebAppsWG =&gt; Components Model
  To: WHATWG =&gt; HTML</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>122824</commentid>
    <comment_count>2</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2015-08-28 07:39:27 +0000</bug_when>
    <thetext>This should not have been moved without considering whether the issue was already resolved, which I think it is.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>