News for hackers. Stuff that matters.
Re:Google is killing the open web, part 2 by ErroneousBosh on Monday November 17, 2025 @12:44PM (#45955954)
> it would tell you about things like separating content from styles and layout, yes.

That's what CSS does.

Re:Google is killing the open web, part 2 by antod on Monday November 17, 2025 @02:48PM (#45957449)
XSLT is really separating (XML) data from markup in the case of the web. More generally it's transforming between different XML formats.

But in the case of docs (eg XML-FO for docbook, DITA etc) XSLT does actually separate content from styling.

Re:Google is killing the open web, part 2 by ndriscoll on Monday November 17, 2025 @12:50PM (#45956009)
Yes that's why XSLT is such a natural fit when you learn about HTML+CSS. It's the same idea, but applied to HTML templates, which is something you immediately want when you hand-write HTML (e.g. navbars, headers, and footers that you can include on every page).
Re:Google is killing the open web, part 2 by ErroneousBosh on Monday November 17, 2025 @12:53PM (#45956043)
Your problem here is that you're hand-writing HTML including all the templates. This wasn't a good way to do it 30 years ago and it's not a good way to do it now.

See all these "static site generators" everyone's into these days? We used those in the mid-90s. They were called "Makefiles".

Re:Google is killing the open web, part 2 by ndriscoll on Monday November 17, 2025 @12:58PM (#45956087)
Yeah because I was 11 and didn't know what a Makefile was. That's my point. I wanted to make web pages, and didn't know any programming. HTML is designed to be hand-written. You just write text, and when you want it to look different, you wrap it in a thing. When doing this, you'll quickly want to re-use snippets/invent your own tags. XSLT gives a solution to this without saying "okay let's back up and go learn how to use a command line now, and probably use an entirely different document format" (SSGs) or "okay let's back up and learn about functions, variables, classes, and callbacks, and maybe a compiler" (Javascript). It just says "when you want to make your own tags, extract them into a 'template' tag, then include your templates just like you include a CSS file for styles".