I'd enjoy a #lang that parses Jinja templates. They've proliferated to all the major web languages and work nicely, so a Racketized version seems like an obvious upgrade.
On Thu, Jan 4, 2018, at 3:23 PM, Matthew Butterick wrote: > >> On Jan 4, 2018, at 11:47 AM, Jay McCarthy >> <jay.mccar...@gmail.com> wrote:>> >> FWIW, txexpr is essentially just `xexpr->string` but it sees when you>> put >> in a `script` or `style` and it puts the `make-cdata` for >> you. (It>> also does a bit more checking to make sure the xexpr is >> well-formed.)> > > For anyone curious why — the HTML spec calls for `script` and `style` > blocks to be treated as if they were CDATA but without actually > requiring a CDATA wrapper. [1] So `xexpr->html` handles that > housekeeping. `xexpr->string` doesn't (because it has XML, not HTML, > in mind). See also: [2]> > If we were to dig down further there are probably certain tags that > should be closed one way in XML and a different way in HTML but ... > I've served zillions of HTML pages made with `xexpr->html`. No one has > complained (I mean, about the level of spec compliance).> > > On Thu, Jan 4, 2018 at 8:48 AM, Matt Jadud <m...@jadud.com> wrote: >>> >> What is the best way to generate HTML from the webserver? I don't >> care about XML vs. HTML; I just want the fastest path to writing a >> small web application that solves a problem that I have,> > FWIW I've found that keeping the HTML template static, and populating > it with data from AJAX requests back to the Racket web server, can > help keep things clean.> > > [1] https://www.w3.org/TR/html4/types.html#h-6.2 > > [2] https://groups.google.com/d/topic/racket-users/g0NuR5KLH7k/discussion> > -- > You received this message because you are subscribed to the Google > Groups "Racket Users" group.> To unsubscribe from this group and stop > receiving emails from it, > send an email to racket-users+unsubscr...@googlegroups.com.> For more > options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.