[plt-scheme] HTML library modules

From: Corey Sweeney (corey.sweeney at gmail.com)
Date: Sat Dec 16 13:53:48 EST 2006

by using the "htmlprag" package on planet, I allow people to edit files in
dreamweaver, and then I parse them into SHTML (lists instead of a string),
then i write a search for my own unique tags, which in the dreamweaver would
look something like:

<insert-scheme-thingy-1-here>
<\insert-scheme-thingy-1-here>

you can also do:
<insert-scheme-code>
(string-append "The number four: " (number->string (+ 2 2))))
<\insert-scheme-code>

the downside is that you loose the parenthisis balancing as it is not
supported in dreamweaver.

Note that htmlprag's SHTML and the "web servet's html", while both are html
formats based on lists, they are not the same format, and i do not believe
they can be used together.  (someone correct me if i'm wrong on that)

P.S. to confirm that everything is going to get parsed correctly before you
start coding you can write a small program that takes the dreamweaver's html
file, converts it to SHTML, converts the SHTML to a string, then displays
the string to the webserver. (the program is like 5 lines long) Do this to
all your html templates that you hope to use.  You can then confirm that
there are no bugs in the parser before you start your project. (A while back
I found a bug via this method, and he fixed it up really quickly when i told
him about it, so if you find a bug let him know)

P.S.S If your ussing a html editor, what editor are you using?  As I'm
writing this, i'm wondering if it would be possible to pop a external editor
for specific tags from dreamweaver.  (i.e. have dreamweaver calldrscheme to
edit the string between:
<insert-scheme-code>
and:
<\insert-scheme-code>

Corey


On 12/15/06, Tommy Nordgren <tommy.nordgren at chello.se> wrote:
>
>
> On 15 dec 2006, at 06.40, Danny Yoo wrote:
>
> >
> >
> > On Thu, 14 Dec 2006, Tommy Nordgren wrote:
> >
> >> Can someone please point me to tutorials on using the html
> >> libraries included with PLT Scheme? I want to generate HTML files
> >> from templates, containing HTML fragments and embedded Scheme
> >> expressions prefixed with $
> >
> >
> > Hi Tommy,
> >
> > You might find Section 3 here to be useful as background:
> >
> >     http://www.ccs.neu.edu/home/matthias/HtDP/Extended/servlets.html
> >
> > The idea is rather than represent templates as strings, we can use
> > s-expressions.
> >
> >
>         I'm not particularly interested in specifying the entire format as
> Scheme expressions, but only embedded parts.
> I've already got a good Tag Editor for those parts of the files that
> are easily manually edited.
>         Are there any way to plugin custom symbols in the html parser?
>
> ------------------------------------------------------
> "Home is not where you are born, but where your heart finds peace" -
> Tommy Nordgren, "The dying old crone"
> tommy.nordgren at chello.se
>
>
> _________________________________________________
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>



-- 
((lambda (y) (y y)) (lambda (y) (y y)))
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20061216/b5a1b8ca/attachment.html>

Posted on the users mailing list.