[Snow-users-list] SXML/SSAX (second try)

Thomas Lord lord at emf.net
Fri Jul 13 17:07:03 EDT 2007


> Furthermore, I can't speak for the Snow maintainers, but I suspect
> that since XML parsing is such a core feature of a code repository
> like Snow -- which is primarily useful in that it presents a closed
> system of library dependencies -- that it doesn't make a whole lot of
> sense to have a bunch of competing implementations in there, each
> likely to have different syntax, etc.



Please don't think that way.

Given the uncertainties about the designing an XML library,
the opposite is probably true:  a bunch of competing, needs-driven
implementations makes a lot of sense (while we wait for a 
Scheme genius to plunk down the Right Thing to which everyone
naturally chooses to migrate).

I don't mean to argue in favor of sloppiness or design error.
I'm just saying that you should think of a package system 
not as a library of pristine things but rather as a communications
medium through which things are exchanged.

Like: if there are design questions about XML libs, and you 
want to put those before the community, a snowball containing
a strawman XML lib is worth 10x an email question about what
kind of XML lib the package system should have.   At least that's
how it works in CPAN et al.

-t





Julian Graham wrote:
> Woah, woah, woah.  Slow down.  I want to be clear here -- I'm in favor
> of porting Oleg Kiselyov's SSAX/SXML package
> (http://okmij.org/ftp/Scheme/xml.html) to Snow.  Yes, I realize XML
> parsing correctness / efficiency / functionality is very important,
> and that SSAX isn't going to suit the needs of every last-20-percenter
> out there.  But: SSAX is already a very good XML parsing package, and
> it already works.  I don't see any reason it doesn't belong in Snow,
> especially given that it is kind of the de facto Scheme XML parsing
> implementation.
>
> And it (or nearby packages) already does a lot of the last-20-percent
> stuff -- to address a few of the items on Tom Lord's wish list:
>
> * SSAX has a pretty streamy API already, and I've written a DOMish API
> that goes on top of that (SDOM: http://www.nongnu.org/sdom/).
> * SSAX's default namespace handling, while a little frustrating, is
> technically correct.
> * SSAX's parser is also, I believe, pretty adherent as far as
> correctness goes.  SDOM includes an implementation of the Load/Save
> DOM recommendation (including doing pretty-prints), though it's not
> quite complete yet.
> * SSAX doesn't come with DTD support, but SDOM contains a partial
> DTD-parsing implementation.
> * There are Scheme implementations for things like XPATH and XQUERY
> floating around in SSAX's orbit -- see Oleg's site for links.
> * For permissive HTML parsing, there's always Neil Van Dyke's HtmlPrag
> (http://www.neilvandyke.org/htmlprag/), which is SXML-compatible.
>
> I am *way* not arguing for "custom" XML parsers or any kind of
> standards shear -- those SSAX customization features I was requesting
> to be present in a Snow port are already features of SSAX's
> implementation.  As I mentioned earlier, it's not just an XML parser,
> it's also kind of an example of how to build your own parser.  The
> make-parser syntax, if exported, lets users (like me) implement useful
> (but not technically mandated) things that are lacking in the SSAX
> distribution, such as DTD parsing and more flexible namespace
> management, and then plug them into SSAX's vanilla parser.
>
> I actually think we're on the same page here -- unless you seriously
> object to having SSAX as Snow's go-to XML parser.  At the same time,
> given that, by virtue of the nature of SSAX's codebase, any effort to
> get it into Snow is going to require some decisions to be made about
> what parts of it to include, I think it's worth discussing some
> requirements.
>
> Furthermore, I can't speak for the Snow maintainers, but I suspect
> that since XML parsing is such a core feature of a code repository
> like Snow -- which is primarily useful in that it presents a closed
> system of library dependencies -- that it doesn't make a whole lot of
> sense to have a bunch of competing implementations in there, each
> likely to have different syntax, etc.
>
>
> On 7/13/07, Dominique Boucher <dominique.boucher at nuecho.com> wrote:
>   
>>
>>
>> Well said! And I'd go a step further: do it for a single implementation
>> first (your favorite one, or Gambit-C if you don't have one ;-), with an eye
>> on portability.
>>
>>
>>
>> Dominique
>>
>>
>> Perhaps my serious suggestion is: don't worry so much.   Just
>>
>> get a package out there that does any damn thing that might
>>
>> be useful and then go from there.   Separate concerns:   a snowball
>>
>> for XML processing that happens to have some mud in it is a
>>
>> good place to start -- then separately, start making that snowball
>>
>> really top-notch.   Don't make "getting XML in Scheme perfect"
>>
>> a pre-condition for "here's a snowball for XML processors".
>>
>>     
> _______________________________________________
> Snow-users-list mailing list
> Snow-users-list at iro.umontreal.ca
> https://webmail.iro.umontreal.ca/mailman/listinfo/snow-users-list
>
>   



More information about the Snow-users-list mailing list