Speaking of the html-writing module, I noticed this in the docs:
> "This is
> [Result is:] "This isbold italic text."
That does not seem like a correct result.
On 4 Jan 2018, at 19:07, Philip McGrath wrote:
> P.S.: I was very comfortable reading and writing HTML and XML-ish notation
> long before I came to Racket, and I initially resisted giving up my
> angle-brackets (to the extent of fiddling around with reader extensions),
> but I have
What would the characteristics of the perfect library be?
Some easy things that come to mind:
- automatically generate the boilerplate -- DTD, tags, etc
- convenient methods for converting a LoL into a table
- able to "literate assemble" template fragments from the disk
On Thu, Jan 4, 2018 at
FWIW, I use `response/xexpr` in production with a `#:preamble` of `#"\n"`, and I haven't run into problems.
The biggest non-obvious thing, since I see you're generating a script
element, is that `response/xexpr` (and the underlying `xexpr->string`/`
write-xexpr`) properly escape < and & in body
> Hi all - happy new year Racketeers!
> For the last two years, we've been thinking about making programming
> accessible for differently-abled students. We're focusing first on students
> with visual and sensorimotor impairments, by building an editor that allows
> students to
tor. 4. jan. 2018 kl. 17.48 skrev Matt Jadud :
> 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, and part of that means
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
(For posterity, because I realized I didn't explicitly say this:)
The cdata structure effectively just tells functions like `write-xexpr` to
write the string it contains without any escaping. In particular, it
doesn't add the "" implied by using
CDATA in actual XML, which is what we take
David Storrs wrote on 01/04/2018 02:27 PM:
Many thanks for all of the responses. I have no fear of the parentheses,
and will likely end up with a number of wrappers like you describe,
Phillip. I hadn't (yet) twigged to possibly wrapping things up in a CDATA
section, but that makes sense.
Now if we just had a Racket library that shoveled
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.)
On Thu, Jan 4, 2018 at 2:30 PM, Philip McGrath wrote:
> On Jan 4, 2018, at 11:47 AM, Jay McCarthy 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.)
I've been experimenting with various corner cases of the macro system to
better understand the implementation. For comparison, I've also been
running the experiments in Chez Scheme.
I found a difference of opinions when running the following two tests. The
idea is to test under what
I don't think the perfect library exists, because HTML has changed
considerably since most Racket libraries were written.
I think xexpr do 90% of the job, but fails on the issues mentioned in
that issue. I think the best option right now is either
I read through this issue:
and am in the "what is going on?" category of user when it comes to HTML
generation in Racket. What should I be using to generate responses from a
servlet? response/xexpr? Does that generate HTML I can use
Mail list logo