Now that Thymeleaf seems to have been abandoned in a half-broken state, anyone know of any decent XML based HTML template libraries for Java?

To be explicit, I *don't* want generators that use Jinja-like text syntax to generate markup-ish tag soup output. Rather, something that requires well-formed XML input so that it generates well formed HTML output. This implies using markup for control statements etc, like Thymeleaf or Genshi.

TIA!

[boosts appreciated]

#java #html #templating #thymeleaf

To my mind, Genshi remains the pinnacle of HTML template library development, never surpassed.

If someone feels like porting it to Java, I would be eternally grateful. 🙏🏻

@mjog I don't have a suggestion, but I am having bad memories of all the awful ways I've used to generate HTML in the past. Will I ever get over having used ASP.NET Webforms?

I do wonder if a clean, efficient solution was ever widely agreed on.

@abstractcode It seems like the world has, for worse, settled on Jinja-like approaches, which basically make it trivial to do the wrong thing. It's the PHP of the HTML templating world.

There is, happily, an extremely well-suited and well-supported, strict, markup-supporting input language that we could use to make sure generated HTML output is always well-formed: It's called XML.

Sadly, XML has a shit reputation after being the GenAI of the early 2000's. So even for perfect use-cases such as this, people flinch away from it, and hence we are stuck with crap like Jinja.

@mjog I’ve done many horrors, I started with Classic ASP. I am happy to be well away from front end. I am not a fan of having things produce HTML in ways that aren’t complete (tags left open etc), that’s never a good way to build something robust. Jinja is not something I’ve encountered, but it sounds similar to things I have.
@mjog
Maybe not exactly what you are looking for but at least actively maintained and pretty fast
https://quarkus.io/guides/qute
Qute Templating Engine

Quarkus: Supersonic Subatomic Java

@mjog What do you want the library to accomplish? Would XSLT suffice?