Re: [webcomponents] More backward-compatible templates

On Wed, Oct 31, 2012 at 11:18 AM, Anne van Kesteren <annevk@annevk.nl> wrote:
> On Wed, Oct 31, 2012 at 7:13 PM, Adam Barth <w3c@adambarth.com> wrote:
>> It seems like the number of backslashes might grow exponentially...
>
> No, <\/script> is enough to not trip up the current parser. However,
> using that syntax is ugly.

Then maybe I don't understand how parsing will work.  How does the
parser know when the "Folder i" template stops?  It can't just scan
ahead for <\/scirpt> if we're using <\/script> to terminate the "Email
i" template.  Similarly, it can't just match <script> and <\/script>
tags because then nested templates will parse differently than
top-level templates...

I've reproduced the example below because you've trimmed the context
out of your reply:

<script type=template>
    <h1>Inbox</h1>
    <script type=template>
        <h2>Folder i</h2>
        <script type=template>
            <h3>Email i</h3>
            <script type=template>
                <h4>Recipient i</h4>
            <\\\\/script>
        <\\/script>
    <\/script>
</script>

Adam

Received on Wednesday, 31 October 2012 18:24:32 UTC