W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2012

Re: [webcomponents] More backward-compatible templates

From: Adam Barth <w3c@adambarth.com>
Date: Wed, 31 Oct 2012 11:23:32 -0700
Message-ID: <CAJE5ia8HUvWzRYT=PEBtda7db5e5hCb6GeSGL=s5SS5PsbE+3g@mail.gmail.com>
To: Anne van Kesteren <annevk@annevk.nl>
Cc: Maciej Stachowiak <mjs@apple.com>, "public-webapps@w3.org WG" <public-webapps@w3.org>
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 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:55 GMT