Has to produce 12π
<custom-element tag="dce-1" hidden="">
{//slice/fruits/text()}
<slot>π€</slot>
<local-storage key="cherries" slice="fruits"></local-storage>
</custom-element>
<dce-1>π</dce-1>
Click the fruits button to add into cart
<custom-element tag="dce-2" hidden="">
<template>
<local-storage key="basket" slice="basket" live="" type="json"></local-storage>
<xhtml:table xmlns:xhtml="http://www.w3.org/1999/xhtml">
<xhtml:tbody>
<xsl:for-each select="//basket/@*">
<xhtml:tr>
<xhtml:th> {name()} </xhtml:th>
<xhtml:td> {.} </xhtml:td>
</xhtml:tr>
</xsl:for-each>
</xhtml:tbody>
<xhtml:tfoot>
<xhtml:tr>
<xhtml:td><slot>π€</slot></xhtml:td>
<xhtml:th> {sum(//slice/basket/@*)} </xhtml:th>
</xhtml:tr>
</xhtml:tfoot>
</xhtml:table>
</template>
</custom-element>
<dce-2>πtotal</dce-2>
cherries | 12 |
---|---|
lemons | 1 |
13 |