Remix.run Logo
ndriscoll 6 hours ago

I was such a non-programmer as a child, yes. At the time that XSLT was new, if you read a book on HTML and making web pages from the library, it would tell you about things like separating content from styles and layout, yes. Things that blew my mind were that you could install Apache on your own computer and your desktop could be a website, or (as I learned many years later) that you could make a server application (or these days now Javascript code) that calls a function based on a requested path instead of paths being 1:1 with files. By contrast, like I said XSLT was just a natural extension of HTML for something that everyone who's written a couple web pages wants to do.

The fact that the web's new owners have decided that making web pages is too marginal a use-case for the Web Platform is my point.

ErroneousBosh 6 hours ago | parent [-]

> it would tell you about things like separating content from styles and layout, yes.

That's what CSS does.

antod 4 hours ago | parent | next [-]

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.

ndriscoll 6 hours ago | parent | prev [-]

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).

ErroneousBosh 6 hours ago | parent [-]

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".

ndriscoll 6 hours ago | parent [-]

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".