Let's build a website using XML!
It is 2023. XHTML is dead and buried. HTML is a "living standard" with billions of users. So what kind of idiot would want to build a website using XML?
Me. I am that idiot.
Last year, I launched a "web page" which didn't use HTML. Called, appropriately enough, "YOU DON'T NEED HTML!" That (ab)used Unicode to make a somewhat attractive page. This year, I decided to forego the Unicode silliness and use XML silliness instead.
Demo
Visit https://xml.viii.fi/index.xml and see for yourself. Take a look at the source-code to verify that it is, indeed, an XML document.

All modern browsers should be able to render it. If you spot any glitches - please let me know.
Why
Because I can 😂
OK, there were three main reasons:
- I learned this stuff at University about a million years ago and I wondered if these skills were still relevant (they aren't!)
- Browsers are constantly deprecating old features. I wanted to see if XML & XSL still worked (they do!)
- The voices in my head told me to (they didn't!)
As an additional bonus reason - I'm bemused by the number of pages which are basically JSON files with client side Javascript rendering. So I thought I'd go old-skool and have the client rendering done without any JS!
Bonus bonus reason - semantics!

How
Regular readers will recall that I wrote about how to style your WordPress Atom feed. The technique is pretty simple: take a well-formed XML document and link it to an XSL stylesheet, et voilà there's a beautifully rendered document in your browser.
For this demo, I didn't bother with a proper document schema. I just bashed some random elements together.
The XSL tells the browser to render it as HTML and provides a scaffold for doing so.
It is all gussied up with some fairly generic CSS.
And that's it really.
I'm delighted that this technique still works. I don't think you should use this unless you absolutely need a lightweight way to render XML directly.
Oooph. I think about 2001 I wrote an entire api/soap/website admin interface that was entirely xml/xslt.I'm kinda proud that it worked, but I think as soon as I left they probably killed it because it was just way too difficult to maintain long term.webdevxml
Boaty McBoatface says:
More comments on Mastodon.