Hacker News new | past | comments | ask | show | jobs | submit login

Skip the python and use xml+xslt directly in the browser if you like it



Try to write a generic data and time formatting template in xslt to let you do basic arithmetic on timestamps of the type you might want in a view.

When you've stopped screaming in horror at what you've suffered, we can discuss whether you still think that's a good idea.

The overall concept is good, but sadly xslt is constrained enough to be massively painful for this kind of thing.


I tried it for a couple days years ago. I concluded it was not a good idea then

I'm a full stack guy myself, so I'll stick with React.


So a pretty bad faith suggestion then - the way the linked site does things is nothing remotely resembling your "suggestion" to use XSL.


The XML+XSLT equivalent here would be an XSLT stylesheet with a bunch of predefined rich parametrized templates that you can just <xsl:call-template>. Hand-coding XSLT to produce HTML (or whatever) is still rather tedious.


Did this extensively in the mid-naughties. Huge site, lots of data and traffic.

Performance exceeded what was available at the time, scaled super well, but not something I’d ever go back to.

- xslt is not a programming language. As soon as you start using xslt:functions you’re doomed.

- it is not a fit for interactive UIs. It’s good for static content, trying to mix in js goes wrong very quickly.

My opinion is that these days infra is cheap enough that you get all the same benefits by doing standard templating in your language of choice from your data in json or whatever. Which I know is essentially the same thing without the specialist software and dsl. And that’s kind of the point.


Once you get to XSLT 2.0+, it is a programming language, just a very verbose one. I did a lot of XSLT/XQuery back in mid-00s, albeit not in web frontend context (we used it for code generation).

Unfortunately no browser has ever supported anything past XSLT 1.0.


Similar story for me. Conceptually I still like the idea, but not with XSL. JS operating on JSON as you say can do the same, but without all the needless pain. Though I'd still love a more declarative option - but I'll sacrifice that before I use XSL again.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: