Re: [WICG/webcomponents] [templates] How featureful should the default processor be? (#682)

We could compromise by reviving [Netscape 4’s JavaScript Entities](http://www.javascriptkit.com/javatutors/entity2.shtml), which would appeal to everyone the same amount (i.e. not at all):

```html
<template>
  <time datetime="&{input.iso8601};">&{input.forHumans};</time>
</template>
```

More seriously, are there specific features we want to _avoid_ from the last time declarative templating was added to the Web in XSLT?

```xml
<xsl:template>
<xsl:for-each select="items">
  <xsl:choose>
    <xsl:when test="self.done"/> <!-- forgive my bad XPath -->
    <xsl:otherwise>
      <xsl:value-of select="item.text"/>
    </xsl:otherwise>
  </xsl:choose>
</xsl:for-each>
</xsl:template>
```

I assume the verbosity is undesirable, but accumulated knowledge from implementing/working with it seems like it would usefully inform how powerful this feature should be.

Additionally, the other existing API to compete with on convenience is one we don’t want to look more appealing:

```html
<template>
  <ul class="todo-list">
    <script>
      items.forEach(item => if (!item.done) document.write(`<li class="todo-item">${item.text}</li>`))
    </script>
  </ul>
</template>
```



-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/WICG/webcomponents/issues/682#issuecomment-876510054

Received on Thursday, 8 July 2021 15:00:02 UTC