This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 15589 - [Shadow]: Content element should be able to specify a parser context for fallback content, and allowed in many (any?) contexts
Summary: [Shadow]: Content element should be able to specify a parser context for fall...
Status: RESOLVED FIXED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: HISTORICAL - Component Model (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Dimitri Glazkov
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 14978
  Show dependency treegraph
 
Reported: 2012-01-17 02:41 UTC by Dominic Cooney
Modified: 2012-01-18 18:49 UTC (History)
0 users

See Also:


Attachments

Description Dominic Cooney 2012-01-17 02:41:40 UTC
The content element may be used to provide fallback content in various contexts, for example, by providing rows in a table:

<table>
  <content select="tr">
    <tr>
      …
    </tr>
  </content>
</table>

Should the content model of all? almost all? elements be extended to permit the content element?

Should the content element be able to specify its content model (perhaps by analogy to another element; in the above example as table?)
Comment 1 Dimitri Glazkov 2012-01-17 21:44:33 UTC
Note to self: this is going to be the same set of content model modifications as for HTML Templates.
Comment 2 Dimitri Glazkov 2012-01-17 23:53:37 UTC
I believe this is the Transparent content model: http://www.whatwg.org/specs/web-apps/current-work/multipage/elements.html#transparent

What do you think?
Comment 3 Dimitri Glazkov 2012-01-18 00:25:04 UTC
http://dvcs.w3.org/hg/webcomponents/rev/6d61186d429e

WDYT?
Comment 4 Dominic Cooney 2012-01-18 02:18:17 UTC
Transparent content model is splendid for the content element’s content model.

There is still the problem of allowing content element everywhere. The transparent content model doesn’t affect where the element with the transparent content model can appear, does it? For example we still have this problem:

<table>
  <content>
    <tr>
      <td>foo</td>
    </tr>
  </content>
</table>

will be parsed as something like

<table>
  <content></content>
  <tbody>
    <tr>
      <td>foo</td>
    </tr>
  </tbody>
</table>

?
Comment 5 Dimitri Glazkov 2012-01-18 03:25:43 UTC
(In reply to comment #4)
> Transparent content model is splendid for the content element’s content model.
> 
> There is still the problem of allowing content element everywhere. The
> transparent content model doesn’t affect where the element with the transparent
> content model can appear, does it? For example we still have this problem:
> 
> <table>
>   <content>
>     <tr>
>       <td>foo</td>
>     </tr>
>   </content>
> </table>
> 
> will be parsed as something like
> 
> <table>
>   <content></content>
>   <tbody>
>     <tr>
>       <td>foo</td>
>     </tr>
>   </tbody>
> </table>
> 
> ?

That's just hard-coded into the parser: http://www.whatwg.org/specs/web-apps/current-work/multipage/tree-construction.html#parsing-main-intable

As far as I understand, content models aren't related back into the parser. They are just semantic glitter.
Comment 6 Dimitri Glazkov 2012-01-18 18:49:15 UTC
I am going to close this and open parser changes bug separately.