does anyonw know of a TEXT templating engine with ...
# random
n
does anyonw know of a TEXT templating engine with IDE support that can use a generated schema? eg. look up allowed variables (and types) for autocompletion ideally in a way that my program can generate a schema best would be idea and vscode plugins for it.. but just one of them would work fine as well what i am looking for is like json-schema for html or markdown templating to make obvious mistakes visible to users as soon as possible rather than only when compiling the template (as that happens rather late in a longer list of processing steps) although i hope to find something that i can use in kotlin/JVM context
d
Doesn't XML fit this description? I'm not an expert in it, but I know it provides very extensive support for document schemas and templates, and lets you be quite specific about allowable sections and values. On top of that, very comprehensive language support. IDE support may vary but there are a lot of editing environments to choose from.
n
how exactly would a xml file turn into html or markdown then ? note: i am looking for a existing tool, not get too sidetracked building yet another templating engine although the templating system itself is not hard to do.. its practically worthless to me without a IDE plugin that makes it intuitive for users .. and that seems like effort i do not have time for
n
XSLTs can turn XML into HTML, but then you have to write XSLTs
n
i was looking for a templating language the likes of liquid, velocity, freemarker, twig, pebble i am just unhappy about the lack of vscode support for those .. more or less .. or lack of jvm support
b
We're just using Kotlin string templating on our project
n
but those cannot be read from text file input at runtime, can they? multipline strings and string interpolation is great.. but it cannot be used as user input unless i use scripting and embed the compiler into the program.. and then again.. the target userbase is not (kotlin) programmers..
b
Right. I include this content in the codebase. It's not read from outside files. Though, it might be worth considering whether the typical way of doing things - reading in a file as a template and then processing it - is really all it's made out to be. Doing it this way means I get full IDE support every step of the way, and this content, generated from a template, is part of my application. Putting it off in a separate file, like it's outside the program, doesn't benefit me at all.
n
different usecase.. i write the application.. but the template is user provided
✔️ 1