[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: a new port of oleg's ssax xml parser to plt

In a message dated 3/29/2002 8:53:48 PM Central Standard Time, 
sk@cs.brown.edu writes:

> Would people prefer to see both available?  SSAX for real projects, a
>  simple XML collection (`lxml', say, for `lightweight XML') that is
>  ideal for tasks like generating Web sites?  We would get rid of some
>  layers of indirection currently in those data structures, perhaps.

There are two things I would like to see that haven't haven't been discussed 
on the list yet.

First, I have always liked the XML structures in xml.ss, but, I'd like to see 
complete support of XML, comparable with SXML-- though particularly better 
support of namespaces. This is not a "lightweight" option. To me, it works 
best with a LAML-like library of element and attribute "constructor 
functions" on top of it. (In fact, this is what I have been doing, with my 
own library of structures that gives more complete support of the XML infoset 
and namespaces.) But it is easier to work with, in some ways: a library like 
Kirill Lisovsky's SXML Tools library is very useful with SXML, but is 
available (nearly) simply by using the functions generated by defining the 
XML structures. And it might be easier to type check a programing working 
with big trees of XML structures than sexprs.

Though I use my own library presently, I would be thrilled to work on top of 
a PLT supported set of structures. But I guess what would be really 
interesting is just to be able to use structures (e.g. as the result of "CGI 
scripts") where the xml.ss "XML as sexprs" are used today, but without having 
to convert the structures into those sexprs (or into SXML) first. (Indeed, I 
think the structures would be best entirely separate from the sexpr-based 
representations-- implemented neither underneath nor on top of something like 

The second feature that I find very important in generating web pages (HTML 
in particular, but also SVG), is to be able to embed non-XML data into an 
XML/XHTML document. For example, to be able to embed a representation of a 
CSS stylesheet (or even a data structure that will be written out as 
JavaScript code) into a tree of XML structures-- OR into an SXML document. 
Today, with my own library, I do this with my own library of XML structures 
with CSS. Granted, I could convert the whole thing to a string before 
embeding this in a <style>...</style> element, but doing all that string 
concatenation is a bit ugly, and for some JavaScripts, may be quite awkward.

For the XML structures approach, this means having the extensibility both to 
include new structures in the tree of XML structures, but also being able to 
extend the "XML printer" with handlers for new types of structures. I haven't 
thought much about how to do this kind of thing with SXML, but I think this 
would be great to have.

Jim Bender