Re: Re: sxml dom

Julian Graham <[email protected]> Thu, 16 Dec 2004 19:01:10 -0500
Newsgroups gmane.lisp.scheme.ssax-sxml
Message-ID <[email protected]>
On Thu, 16 Dec 2004 14:53:05 -0800 (PST), [email protected] <[email protected]> wrote:

Hi Oleg,

> Could you give a few details about your application? A small
> representative example would be great. Perhaps the problem you have in
> mind might also be solved in a different way.

Actually, it's not an application, it's a library that renders
CSS-styled XML formats (like Mozilla XUL) for console display with
ncurses.  Basically, I'm trying to make it less painful for people to
create ncurses user interfaces -- I think being able to mark them up
in XML would be almost... fun.  Anyway, real Mozilla XUL uses
ECMAscript, I think, for event scripting; since the scripting language
is not actually part of the XUL "standard" itself, and since I
couldn't find a popular embeddable ECMAscript parser, and because
frankly I'm not a huge fan of ECMAscript, I thought Scheme would make
a great substitute.  However, XUL's event implementation is pretty
closely tied to DOM, so

> But pre-post-order can be understood in the same terms, can it not? An
> encounter of a particular node during the traversal is an
> event. Although I'd prefer the analogy with `fold'. I should also
> remark that many popular languages do not conveniently support
> closures, therefore, traversal APIs become unnecessarily obscure (and
> often ungainly).

Yes, that's certainly true, and I hadn't considered it.  Given that
existing XUL applications will not be portable to my renderer in the
first place because of my use of Scheme, it might not be too much to
ask that users re-think any DOM-wrangling they were planning on doing
in a more functional paradigm.

I'll think about it, but since this morning I've gotten kind of
morbidly excited about the idea of doing a full DOM implementation in
Scheme, so I may just try that for fun.  At any rate, thanks for the
response -- I really like SSAX/SXML.


Cheers,
Julian


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/