← Back to context

Comment by Trustable8

3 hours ago

Shame back in the XHTML days XSLT was a spec that could have made website modularity so much cleaner. I once created an early website creation tool that merged separate components using XSLT it was really powerful in the days before javascript was usable without jQuery. However XHTML was dropped in favor of HTML5 and XSLT was pretty much useless after that. Its done well to survive this long I presume it was mainly kept to style XML files.

HTML5 could have taken the extra step of defining a canonical XML or XML-compatible DOM encoding, or at least encouraged it. But the anti-XML sentiment was explicit and spiteful. Still, popular XSLT processors are built to consume and even produce HTML5, I'm just not sure how thorough those capabilities are or whether they're based on any formal or informal standards. (Maybe the W3C has/had something like that, as part of it's attempts to rollup HTML5 snapshots into versioned standards?)

I lost any enthusiasm for XML after my experience with WDDX and XML-RPC, but as a foundation for HTML it was the best thing going. And maybe still is, given the absence of cross-toolchain contenders? Ditto for XSLT, at least if disregarding the choice to make the syntax homoiconic. In fact I circled back to XSLT long after it was clear it was a dead end. A good tool is a good tool, and the fact it remains so despite the wanton neglect only proves it.

  • > HTML5 could have taken the extra step of defining a canonical XML or XML-compatible DOM encoding, or at least encouraged it.

    Yeah and then we could have called it xhtml5. Too bad that does not exist. Oh wait https://html.spec.whatwg.org/multipage/xhtml.html

    > But the anti-XML sentiment was explicit and spiteful.

    No, xhtml was just a bad idea creating tons of problems and solving none.

    • > xhtml was just a bad idea creating tons of problems and solving none.

      Well an XHTML parser (and serializer) is a lot simpler, which is a pretty meaningful problem to solve.

      What problems does xhtml create?

      11 replies →

i think xhtml happened before the wider world of web devs were ready for it. Component based architectures took longer to be adopted than I certainly expected.

It might actually work if reintroduced these days as long as we can consider many components to be valid documents.

  • There is nothing component-based about xhtml compared to html. It is just html with xml syntax.

The XSLT 1.0 spec specifically was written pretty badly, though, to my recollection; I had a hard time at making sense of it

  • Yeah, XSLT 1.0 has some really obvious missteps, so much so that to my knowledge basically nobody just implements XSLT 1.0. What they actually support is (most of) XSLT 1.0 plus a handful of EXSLT extensions (which are completely unofficial and not part of any XSLT spec, by the way). In my opinion the EXSLT stuff is the bare minimum needed to make XSLT 1.0 at least a passable language. Meanwhile, the XSLT spec evolved into 2.0 and 3.0, which as far as I'm aware, even to this day, has no complete open-source implementation.