Did I already recommend this? Sorry if that's a duplication.
One more example of SXML together with SRFI 110 sweet expressions
(indent sensitive LISP syntax). Those two blend well together. I'm
using them embedded in XML (XSLT) here:
http://ball.askemos.org/Aa176138e655369f8c01c3044ced70cfc
(Be sure to view this as source, not in the browser!)
Remarks: a) this is served from Chicken b) it's a rather simple but
complete payment system, docs coming up here:
http://ball.askemos.org/A0cd6168e9408c9c095f700d7c6ec3224/?_v=search&_id=1856&_go=2
Wilma, Fred and Bamm-Bamm are each running the script above.
Best
/Jörg
Am 21.09.2014 um 22:34 schrieb Arthur Maciel:
Dear Yves, with SXML you could write transformation rules as Peter has
shown in www.more-magic.net/docs/scheme/sxslt.pdf
<http://www.more-magic.net/docs/scheme/sxslt.pdf>.
I'm not experienced with SXML, but AFAIK they would generate a similar
effect as the procedures in your example below.
Best wishes,
Arthur
2014-09-21 17:06 GMT-03:00 Yves Cloutier <yves.clout...@gmail.com
<mailto:yves.clout...@gmail.com>>:
>
> Hello Oleg,
>
> Thank you for your recommendations too. I actually just came back
from the local library where I picked up "The Scheme Programming
Language".
>
> You know, reading through your reply, it was the last part that made
me think about something.
>
> If I can convert my input to the format:
>
> (bold "text")
> (indent 5 "text")
> (bold (smallcap (size 2 "text")))
>
> Could I not define each of these as functions (or procedures), and
then just call an (eval ' ) procedure to do my output?
>
> For example (keeping in mind I'm only just getting familiar with
Scheme syntax!):
>
> (define (bold (text)
> (print the opening tag for the command 'bold')
> (print the string 'text')
> (print the closing tag for the command 'bold'))
>
> (define (indent (indent-value text)
> (print the opening tag for the command 'indent' with value of
'indent-value')
> (print the string 'text')
> (print the closing tag for the command 'indent'))
>
> Actually due to the possible presence of nested commands, it should
probably be something more generic, since in the last example:
>
> (bold (smallcap (size 2 "text")))
>
> what the procedure 'bold' would be taking in is not a string "text",
but rather an expression...so this is where I guess things would need
to be recursive.
>
> Once my document has been converted into one big "s-expression", and
procedures defined accordingly, then I could just (eval ) it..couldn't I?
>
> (eval '(bold "text")
> (indent 5 "text")
> (bold (smallcap (size 2 "text"))))
>
> Or something along those lines?
>
> If this is the case....brilliant!
>
_______________________________________________
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users
_______________________________________________
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users