[plt-scheme] XML and Programming
On Sep 4, Jordan Katz wrote:
> [...]
>
> (define (generate-HTML Content)
> (SRV:send-reply
> (post-order Content
> `(
> , at generic-web-rules
>
> (stylesheet-ref
> . ,(lambda (tag . lines)
> (list "<link rel=\"stylesheet\" type=\"text/css\" href=\""
> lines
> "/>")))
> ...))))
>
> So what do exactly do you mean by "standard Scheme code"? All it
> takes in SSAX is one lambda.
Getting the same effect by something like:
(define (stylesheet-ref tag . lines)
(list "<link rel=\"stylesheet\" type=\"text/css\" href=\""
lines
"/>"))
> > But there is some functionality which is more difficult with my thing:
> > it would be harder to specify that the `title:'->`i:' transformation
> > should happen inside a `book:' wrapper. For this, the XSLT-style
> > transformations are easier.
>
> But that's (at least in my opinion and based on my experience) the
> most important cases of transformations. [...]
Yes, that would be for the case of massaging XML data to other formats
(including HTML). But when you're primarily interested in producing
HTML, its somewhat less useful. I'm being careful here since maybe
there are things I won't see until I use it...
> It was interesting, and your package is very neat. I like it's HTML
> outputting mechanisms a lot. I just fail to see your view on the
> usage/implementation of (XSLT and otherwise) transformations (which is
> primarily what I use SSAX for).
Well, just generic rambling on the enlightenment I had understanding
better why I liked what I have, the way it nicely connects to my own
work, and programming in Scheme vs. programming with transformations.
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://www.barzilay.org/ Maze is Life!