Remix.run Logo
bawolff 2 days ago

Since this seems to be about the recent proposal to remove xslt, i'd point out you can do the same thing with CSS

https://bawolff.net/css-website/index.xml is Evidlo's example but using a css stylesheet instead of xslt. I changed some of the text to explain what i was doing, but otherwise the XML is unchanged with one exception. Unfortunately you do have to put the <a> tags in the xhtml namespace to make them clickable. Other than that no changes to the xml.

Obviously there is a lot that xslt can do that css cannot, but when it comes to just display, CSS is an option here.

egeozcan a day ago | parent | next [-]

This is really, definitely cool, but it's important to remember that content added via CSS is purely decorative. It can't be interacted with, which is a major issue for assistive technologies like screen readers.

lelandfe a day ago | parent [-]

I learned recently that you can provide accessible labels for content: https://www.stefanjudis.com/today-i-learned/css-content-acce...

I haven’t yet cracked open a screen reader to see how it fares, though.

8organicbits 2 days ago | parent | prev | next [-]

> there is a lot that xslt can do that css cannot

This latter part is why I've reached for XSLT in the past. Most recently was to convert an RSS feed into a styled page with instructions at the top. Templates and xpath can really transform a document.

Evidlo a day ago | parent | prev | next [-]

Thanks for the CSS example.

By the way, the advanced/ folder has a slightly more complicated example that demonstrates template inheritance and "slots".

bawolff a day ago | parent [-]

Yeah, i saw. Unfortunately the advanced example wouldn't be doable in CSS. I suppose i'm being a bit intellectually dishonest to not explicitly point that out.

em-bee a day ago | parent | prev | next [-]

that feels a bit to simplified. i'd like to see an example that includes at least some html, and maybe clickable links. it's maybe also worth showing that you can include images with css.

lenkite a day ago | parent | prev | next [-]

Umm..your CSS example doesn't show any template includes. No way to put header/footer in separate files.

em-bee a day ago | parent | next [-]

but they are in a separate file. the css file. you an load multiple css files if you want to break it out.

bawolff a day ago | parent | prev [-]

The original example didn't have that either.

myfonj a day ago | parent [-]

That's strange; the `head` and `footer` nodes were present in the XSL template this morning [1], last GH change was Feb 13 [2], what matches

    curl --head --silent --url https://xsl-website.widloski.com/template.xsl | grep modified
    last-modified: Thu, 13 Feb 2025 07:11:02 GMT
from here.

[1] at 09:11:48, according https://web.archive.org/web/*/http://xsl-website.widloski.co... [2] https://github.com/Evidlo/xsl-website/commits/master/templat...

bawolff a day ago | parent [-]

The footer is in the stylesheet in both my and Evidlo's example. In neither of our examples are these in separate files from the stylesheet.

Pxtl a day ago | parent | prev [-]

> i'd point out you can do the same thing with CSS

Cool when are they removing CSS from the standard?