Re: sxml dom
[email protected] Thu, 16 Dec 2004 14:53:05 -0800 (PST)
| Newsgroups | gmane.lisp.scheme.ssax-sxml |
|---|---|
| Message-ID | <[email protected]> |
Hello! Julian Graham wrote: > SSAX does not actually provide a DOM-manipulation API. It means you're talking about transforming an already parsed document -- e.g., removing elements, adding attributes, remapping namespaces. Right? If so, you might be interested in SXSL transformations then. Granted, pre-post-order is not fully general (because it doesn't pass the state as a fold does), but it is often useful. There are also tree fold and more complex combinators, if the problem so demands. > In case it's not obvious, I'm writing such an application, and I'm > looking into how possible it would be to do a fully Scheme > implementation of the DOM3 core API without adding any extra > annotation to the SXML format. 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. > But DOM provides some nifty things (like event handling) 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). MJ Ray wrote: > I agree, although sometimes there are one or two things I wish I could > do more easily. I'll try to remember to note them next time I hit > them Please do post them. I'm curious too. It's often difficult to come up with the set of right abstractions a priori. Only experience can show what is really needed. Cheers, Oleg ------------------------------------------------------- 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/