Den søn. 3. feb. 2019 kl. 05.57 skrev David Storrs <david.sto...@gmail.com>:

> There was a discussion in another thread lately about various ways of
> representing XML.  It got me thinking, and I wanted to ask about
> people's practical experience.
>
> What projects have y'all done where XML was the best choice for a
> reason other than "because we needed to interoperate with a service
> that required XML"?
>
> I've never needed to use XML that much -- HTML and CSS for the
> browser, ...


If you count representations of HTML then I am fond of representing HTML as
Racket structures.
Combined with the at-syntax from Scribble one can write code that looks
like:

(define (html-flash-card)
  ; style: "border:1px solid black"
  @div[class: "col-md-6" ]{
    @div[id: "flash-card-content"]{
      @div[id: "flash-card-question-container"]{
        @div[id: "flash-card-question"]{
          @h2{Flash Card}
          @p{The name of the mathematical exponentiation operator?}
          @p{ $$ c = \sqrt{a^2+b^2} $$}}}
      @html-answer-box[]}})

The example is from

https://github.com/soegaard/urlang/blob/master/urlang-examples/quiz/quiz.rkt

The docs are here:
    http://docs.racket-lang.org/html/index.html?q=html

/Jens Axel

-- 
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.

Reply via email to