Remix.run Logo
MangoToupe 6 days ago

[flagged]

alexjplant 6 days ago | parent | next [-]

XSLT is a declarative language for transforming XML to other formats. XML is a pretty poor solution for configuration files (which is what everybody seemed to use it for back in the day) but works great for, you guessed it, marking up documents. If you have an XML schema for representing documents semantically you can then write an XSLT that quickly and efficiently converts it to, say, XHTML. This way you can work in a nice intermediate representation rich with meaning and specify the presentation as a function thereof.

It's not particularly sexy technology but it works well when used judiciously. Part of me wonders if XML will make some bizarre comeback in the era of LLMs for training data annotation or something similarly niche.

MangoToupe 6 days ago | parent [-]

Ok, but my question stands. What value does this provide society?

jamesnorden 6 days ago | parent [-]

What value do you provide society?

MangoToupe 6 days ago | parent [-]

How is this relevant to figuring out why xml document transformations exist?

I feed my family.

alexjplant 6 days ago | parent [-]

Stop posting on HN and go read "Ishmael" if this is how you feel. 100% serious, no snark.

savolai 6 days ago | parent | prev | next [-]

In combination with https://docs.hyperclay.com/docs/docs-tldr-paste-in-llm/ it could be used to build a lightweight offline configuration editor, for instance.

savolai 5 days ago | parent [-]

As this was briefly flagged I’ll extrapolate as I was considering doing this myself as thought experiment.

I wondered could this be the architecture i’m looking for since I want something that is offline first but works online. Hyperclay removes a lot of the architectural heft of traditional web apps. But of course now the data is in the dom. So xslt could in theory be used to bring it back into an actually-structural format.

I.e. treat the DOM as a view and use XSLT as the lossless bridge back to structured, declarative and deterministic config. Round-trips are doable. One stylesheet renders config → HTML editor. Another extracts edited DOM → config.

Of course, if downstream systems expected JSON, transforming DOM→JSON via JS might be simpler. My previous backend is sqlite though.

simoncion 6 days ago | parent | prev | next [-]

XSLT are the "XSL Transformations".

As described in [0]

> XSLT ... is a language for transforming XML documents into other XML documents. ... XSLT is designed for use as part of XSL, which is a stylesheet language for XML.

If you don't know what "XML" is, go ask your favorite search engine.

If you want to know who uses XSLT, go review the existing discussion on the topic. In summary, it's a bunch of people that Google doesn't really care about (and almost certainly far more people than use WebUSB or WebMIDI [1] and the like).

[0] <https://www.w3.org/TR/1999/PR-xslt-19991008>

[1] Yes, really.

MangoToupe 6 days ago | parent [-]

My question stands. What value does this provide society?

simoncion 5 days ago | parent [-]

If you have specific questions about XSLT or the standard(s) that define it, I'm happy to attempt to answer them.

therein 6 days ago | parent | prev [-]

I always thought of it as a specialized XML extension that describes transformations on other XML documents. Never used it, not sure why anything on my system uses it if I don't come across it in my daily software development life either but I have seen it as a dependency more times than I can remember.