I hate this grug brain writing style. It sounds bad and is hard to read. Please just write normal, full sentences.
Many, many years back I used Symphony21[0] for an events website. It’s whole premise was build an XML structure via blueprints and then your theme is just XSLT templates for pages.
Gave it up because it turns out the little things are just a pain. Formatting dates, showing article numbers and counts etc.
You call XML-based transformation "zero-config", I feel old.
I use XSLT to generate a markdown README from a Zotero export XML file. It works well, but some simple things become much harder - sorting, counting, uniqueness.
https://github.com/captn3m0/boardgame-research
It also feels very arcane - hard to debug and understand unfortunately.
We've come full circle again. Yes this works great since many years, XML is just so much clutter.
I have last used XSLT probably about 2 decades ago. Back then XML was king. Companies were transferring data almost always using XML and translating it to a visual web-friendly format with XSLT was pretty neat. Cool tech and very impressive.
Still maintaining an e-commerce site using XML/xslt and Java/servlet... Passed easily each wave of tech and survived 2 databases migrations (mainframe/db2 => sqlserver => ERP)
- article schema - page schema - non-technical users can author & upload
And the browser takes care of the rendering.
Good times.
Man, I'm sure this is good and all, but I still have ptsd from trying to understand XSLT back in my uni days 15 years ago...
XML needs a renaissance because it solves problems modern formats still fumble with. Robust schema validation, namespaces, mixed content, and powerful tooling like XPath/XSLT. It's verbose, yes. It's can be made to look like shit and make you wanna throw up, but also battle-tested and structured for complexity. We ditched it too soon chasing simplicity.
me busy fixing asan, "illegal instruction", blah blah blah, me sad and frustrated, much scowling.
me come to hn, see xml build system, me happy, much smiling, me hit up arrow, me thank good stranger.
https://packages.grpc.io is an XML page styled with XSLT updated by a bash script in CI
Grug-speak is really not that endearing, could do without it entirely, maybe that’s just me. But exploration of old-ish ideas years after their hype cycles can be worthwhile indeed!
Thanks, I've been wanting this for 25 years.
It’s weird to see the hate for xslt. I loved it, but maybe I just like stack based languages.
Good old xslt. Was quite in the center of attention when strict xml was still a next standard candidate. html5 won.
XSLT is probably the #1 reason people get turned off from XML and swear it off as a mistaken technology. I actually quite like XML, so I have been trying lately to tease out exactly what it is that makes XSLT a mistake.
XML is a semi-structured format, which (apart from & < >) includes plain text as a more or less degenerate case. I don't think we have any other realistic format for marking up plain text with arbitrary semantics. You can have, for example, a recipe format with <ingredient> as part of its schema, and it's trivial to write an Xpath to pull out all the <ingredient>s (to put them in your shopping list, or whatever).
Obviously, XSLT is code. Nobody denies this really. One thing about code is that it's inherently structured. Only the craziest of literate programmers would try to embed executable code inside of text. But I don't think that's the biggest problem. Code is special in that special purpose programming languages always leak outside the domain they're designed for. If you try and write a little language that's really well-scoped to transforming XML, you are definitely going to want to call stuff outside it sooner or later.
Combined with the fact that there really isn't any value in ever parsing or processing a stylesheet, it seems like it was doomed never to pan out.
xslt does one thing clean , walks trees on tree input. both data and layout stay in structured memory. no random jumps. browser-native xslt eval can hit perf spots most json-to-dom libs might miss. memory layout was aligned by design. we dropped it too early just cuz xml got unpopular
I remember learning XSLT from this:
https://zvon.org/xxl/XSLTutorial/Books/Output/contents.html
Still a great resource.
--
I would say CSS selectors superseeded XPath for the web. If one could do XSLT using CSS selectors instead, it would feel fresh and modern.
This gist page uses "me not know, but me know now" to express even a cave man can do it (no offense to cavemen).
I learned one thing: Apply XSL to an XML by editing the XML. But can we flip it?
The web works in MVC ways. Web servers are controllers that output the view populated with data.
(XML) Data is in the backend. (XSLT) View page is the front end. (XPath) Query filters is requesting (XML) data like controllers do.
no more xml
me have make vomit from seeing xml
Long time ago somebody wanted to put a searchable directory of products on a CD. It was maybe 100MB. There was no sqlite back then and the best browser you could count on your client having was probably IE 5.5
JS was waay too slow, but it turned out that even back then XSLT was blazing fast. So I basically generated XML with all the data, wrote a simple XSLT with one clever XPath that generated search input form, did the search and displayed the results, slapped the xml file in CD auto-run and called it a day. It was finding results in a second or less. One of my best hacks ever.
Since then I always wanted to make a html templating system that compiles to XSLT and does the HTML generation on client side. I wrote some, but back then Firefox didn't support displaying XML+XSLT directly and the workaround I came up with I didn't like. Then the AJAX came and then JS got faster and client side rendering with JS became viable. But I still think it's a good idea, to send just dynamic XMLs with static XSLTs preloaded and cached, if we ever want to come back to purely server driven request-response flow. Especially if binary format for XML catches on.
XML is great, one just need to have the appropriate tooling. XSLT, like XSD, is XML too, so the same tooling apply to those as well.
If you're manually writing the <>-stuff in an editor you're doing it wrong, do it programmatically or with applications that abstract it away.
Use things like JAXB or other mature libraries, eXist-db (http://exist-db.org), programs that can produce visualisations and so on.
Anyone with recent real-world experience?
From talking to AI, it seems the main issues would be:
- SEO (googlebot)
- Social Media Sharing
- CSP heavy envs could be trouble
Is this right?
XSLT is great fun as a general functional programming language! You can build native functional data-structures[1], implement graph-traversal algorithms[2], and even write test assertions[3]!
1: https://github.com/pjlsergeant/xslt-fever-dream/blob/main/ut...
2: https://github.com/pjlsergeant/xslt-fever-dream/blob/main/ut...
3: https://github.com/pjlsergeant/xslt-fever-dream/blob/main/ut...
Cant take it seriously with that language, sorry
internet Explorer also had the ability to render XML directly into HTML tables without using any JS using the datasrc attribute. I had to deal with this nonsense early in my career in the early 2000s, along with people regularly complaining that it did not work in Firefox.
https://learn.microsoft.com/en-us/previous-versions/windows/...
All that fuss just to deploy a static website on Vercel? :p
TBH if we were going with old, bad standards, I would rather write m4 macros. It’s preinstalled everywhere too, unlike a browser.
> can use HTML import? nope not exist
Well, Apache says hi: https://httpd.apache.org/docs/2.4/howto/ssi.html (Look for "include")
Abandoning XML tech is was and forever will be the webs biggest mistake. The past 20 years has been just fumbling about trying to implement things that it would have provided easily.
Huh? If I have to write XML why bother. I would do HTML directly.
A trip down memory lane to the Museum of Obsolete Technology (with video demos):
Here's how use XSLT to make Punkemon Pie Menus! [ WARNING: IE 5 required! ;) ]
The "htc" files are ActiveX components written in JScript, aka "Dynamic HTML (DHTML) behaviors":
https://en.wikipedia.org/wiki/HTML_Components
>HTML Components (HTCs) are a legacy technology used to implement components in script as Dynamic HTML (DHTML) "behaviors" in the Microsoft Internet Explorer web browser. Such files typically use an .htc extension and the "text/x-component" MIME type.
JavaScript Pie Menus, using Internet Explorer "HTC" components, xsl, and xml:
https://www.youtube.com/watch?v=R5k4gJK-aWw
>Pie menus for JavaScript on Internet Explorer version 5, configured in XML, rendered with dynamic HTML, by Don Hopkins.
punkemonpiemenus.html: https://github.com/SimHacker/IE-JScript-HTC-PieMenus/blob/ma...
punkemon.xsl: https://github.com/SimHacker/IE-JScript-HTC-PieMenus/blob/ma...
punkemon.xml: https://github.com/SimHacker/IE-JScript-HTC-PieMenus/blob/ma...
punkemonpiemenus.xml: https://github.com/SimHacker/IE-JScript-HTC-PieMenus/blob/ma...
piemenu.htc: https://github.com/SimHacker/IE-JScript-HTC-PieMenus/blob/ma...
Also an XML Schema driven pie menu editor:
piemenuschemaeditor.html: https://github.com/SimHacker/IE-JScript-HTC-PieMenus/blob/ma...
piemenuschemaeditor.xsl: https://github.com/SimHacker/IE-JScript-HTC-PieMenus/blob/ma...
piemenuschema.xml: https://github.com/SimHacker/IE-JScript-HTC-PieMenus/blob/ma...
piemenuschemaeditor.htc: https://github.com/SimHacker/IE-JScript-HTC-PieMenus/blob/ma...
piemenuxmlschema-1.0.xsd: https://github.com/SimHacker/IE-JScript-HTC-PieMenus/blob/ma...
Here's an earlier version that uses ActiveX OLE Control pie menus, xsl, and xml, not as fancy or schema driven:
ActiveX Pie Menus:
https://www.youtube.com/watch?v=nnC8x9x3Xag
>Demo of the free ActiveX Pie Menu Control, developed and demonstrated by Don Hopkins.
ActiveXPieMenuEditor.html: https://github.com/SimHacker/IE-JScript-HTC-PieMenus/blob/ma...
piemenueditor.xsl: https://github.com/SimHacker/IE-JScript-HTC-PieMenus/blob/ma...
piemenueditor.html: https://github.com/SimHacker/IE-JScript-HTC-PieMenus/blob/ma...
piemenueditor.htc: https://github.com/SimHacker/IE-JScript-HTC-PieMenus/blob/ma...
piemenumetadata.xml: https://github.com/SimHacker/IE-JScript-HTC-PieMenus/blob/ma...
Fasteroids (Asteroids comparing Pie Menus -vs- Linear Menus):
fasteroids.html: https://github.com/SimHacker/IE-JScript-HTC-PieMenus/blob/ma...
fasteroids.htc: https://github.com/SimHacker/IE-JScript-HTC-PieMenus/blob/ma...
If that wasn't obsolete enough, here is the "ConnectedTV Skin Editor". It was a set of HTC components, XML, and XML Schemas, and a schema driven wysiwyg skin editor for ConnectedTV: a Palm Pilot app that turned your Palm into a personalized TV guide + smart remote.
Full fresh lineup of national and local broadcast + TiVo + Dish TV guides with customized channel groups, channel and show filtering and favorites, hot sync your custom tv guide with just the shows you watch, weeks worth of schedules you could download and hot sync nightly with the latest guide updates.
Integrated with trainable consumer IR remote controller with custom touch screen user interfaces (with 5-function "finger pie menus" that let you easily tap or stroke up/down/left/right to stack up multiple gesture controls on each button (conveniently opposite and orthogonal for volume up/down, channel next/previous, page next/previous, time forward/back, show next/previous, mute/unmute, favorite/ignore, etc -- finger pies are perfect for the kind of opposite and directionally oriented commands on remote controls, and you need a lot fewer 5-way buttons than single purpose physical buttons on normal remotes, so you could pack a huge amount of functionality into one screen, or have any number of less dense screens, customized for just the devices you have and features you use. Goodbye TiVo Monolith Monster remote controls, since only a few of the buttons were actually useful, and ConnectedTV could put 5x the number of functions per gesture activated finger pie menu button.
The skin editor let you make custom user interfaces by wysiwyg laying out and editing out any number of buttons however you liked and bind tap/left/right/up/down page navigation, tv guide time and channel and category navigation, sending ir commands to change the channel (sends multi digits per tap on station or show so you can forget the numbers), volume, mute, rewind/skip tivo, etc.
Also you could use finger pies easily and reliably on the couch in a dark room with your finger instead of the stylus. Users tended to lose their Palm stylus in the couch cushions (which you sure don't wanna go fishing around for if JD Vance has been visiting) while eating popcorn and doing bong hits and watching tv and patting the dog and listening to music and playing video games in their media cave, so non-stylus finger gesture control was crucial.
Finger pies were was like iPhone swipe gestures, but years earlier, much cheaper (you could get a cheap low end Palm for dirt cheap and dedicate it to the tv). And self revealing (prompt with labels and give feedback (with nice clicky sounds) and train you to use the gestures efficiently) instead of invisible mysterious iPhone gestures you have to discover and figure out without visual affordances. After filtering out all the stuff you never watch and favoriting the ones you do, it was much easier to find just the shows you like and what was on right now.
More on the origin of the term "Finger Pie" for Beatles fans (but I digress ;) :
https://news.ycombinator.com/item?id=16615023
https://donhopkins.medium.com/gesture-space-842e3cdc7102
It was really nice to have the TV guide NOT on the TV screen taking you away from watching the current show, and NOT to have to wait 10 minutes while it slowly scrolled the two visible rows to through 247 channels to finally see the channel you wanted to watch (by that time you'll miss a lot of the show, but be offered lots of useless shit and psychic advice to purchase from an 800 number with your credit card!).
Kids these days don't remember how horrible and annoying those slow scrolling TV guides with ads for tele-psychics and sham wows and exercise machines used to be.
I can objectively say that it was much better than the infamous ad laden TV Guide Scroll:
https://www.youtube.com/watch?v=JkGR29TSueM
Using those slow scrolling non-interactive TV guides with obnoxious ads was so painful that you needed to apply HEAD ON directly to the forehead again and again and again to ease the pain.
https://www.youtube.com/watch?v=Is3icfcbmbs
You could use the skin editor to create your own control panels and buttons for whatever TV, TiVO, DVR, HiFi, Amplifier, CD, DVD, etc players you wanted to use together. And we had some nice color hires skins for the beautiful silver folding Sony Clie.
https://en.wikipedia.org/wiki/Sony_CLI%C3%89_PEG-TG50
It was also nice to be able to curate and capture just the buttons you wanted for the devices that you actually use together, and put them all onto one page, or factor them out into different pages per device. You could ignore the 3 digit channel number and never peck numbers again, just stroke up on your favorite shows to switch the channel automatically.
We ran out of money because it was so expensive to license the nightly feed of TV guide (downloading a huge sql dump every night of the latest schedules as they got updated), and because all of our competitors were just stealing their data by scraping it from TV guide web sites instead of licensing it legally. (We didn't have Uber or OpenAI to look up to for edgy legal business practice inspiration.)
Oh well, it was fun while it lasted, during the days that everybody was carrying a Palm Pilot around beaming their contacts back and forth with IR. What a time that was, right before and after 9/11 2001. I remember somebody pointedly commented that building a Palm app at that time in history was kind of like opening a flower shop at the base of the World Trade Center. ;(
https://github.com/SimHacker/ConnectedTVSkinEditor
https://www.pencomputing.com/palm/Pen44/connectedTV.html
https://uk.pcmag.com/first-looks/29965/turn-your-palm-into-a...
Connected TV User Guide:
Overview: https://donhopkins.com/home/ConnectedTVUserGuide/Guide1-Over...
Setting Up: https://donhopkins.com/home/ConnectedTVUserGuide/Guide2-Sett...
Using: https://donhopkins.com/home/ConnectedTVUserGuide/Guide3-Usin...
Memory: https://donhopkins.com/home/ConnectedTVUserGuide/Guide4-Memo...
Sony: https://donhopkins.com/home/ConnectedTVUserGuide/Guide5-Sony...
[dead]
[flagged]
Blast from the past. I actually used XSLT quite a bit in the early 00s. Eventually I think everyone figured out XML is an ugly way to write S-expressions.
What is needed more now is YAML, especially the visualization of the YAML format supported by k8s by default. On the contrary, in the devops community, people need to generate YAML through HTML to execute cicd. For example, this tool shows k8s-generator.vercel.app
You don't even need XML anymore to do XML, "thanks" to iXML where you can provide a grammer of any language and have that work as if you are working with XML. Not saying that is a good idea though.