Hacker News new | past | comments | ask | show | jobs | submit login

You're looking for XHTML



I don't recall components being in the XHTML spec.


XML:

    ...
    <counter xmlns="my" />
XSLT:

    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:my="my">
      ...
      <xsl:template match="//my:counter">
        <form>
          <button onclick="form.counter.value -= 1;return false">-</button>
          <input name="counter" value="0">
          <button onclick="form.counter.value = 1 + +form.counter.value;return false">+</button>
        </form>
      </xsl:template>
    </xsl:stylesheet>
XSLT looks ugly but only because we should not edit plain text XML (same for markup). <template> is a limited version of XSLT.


Not in the 1.0 spec, but 1.1 brought modules. For example, MathML can be used as an XHTML module.

Mind you, there isn't exactly a 1:1 mapping between modules & web-components, with the former being 20 years old at this point.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: