[plt-scheme] Announce: WebIt! - An XML Collection (version 0.4)

From: MJ Ray (markj at cloaked.freeserve.co.uk)
Date: Mon Aug 5 07:42:25 EDT 2002

Soz for the delay while I was away.

Benderjg2 at aol.com <Benderjg2 at aol.com> wrote:
> re: match--
> A difference between my matcher and match.ss
> is that I specify the pattern in terms of the data constructors,
> match.ss specifies the pattern in terms of the data. With s-exprs,
> you would write an xml-rules pattern for a list as (cons ,v1 (cons ,v2 '()),
> rather than (,v1 ,v2). Now obviously you would never want to write
> patterns for lists this way (in terms of cons calls), but for XML, you would 
> never want to have to write the pattern in terms of the underlying data
> structure. 

Never?

> First, it would be less natural looking-- the underlying data is actually
> a tree of structures. Second, you would expose really ugly things, like
> namespace urls.

Handling namespaces is one of the problems, I hit upon.

> I had originally thought to extend either PLT's match or the Indiana match
> to use WebIt!'s constructor's as pattern for matching XML, but in the end
> I liked the syntax-rules style of patterns better.

Shame, I think.

> SXML and WebIt! are very similar ADT's for XML- though with very
> different concrete types. One thing I do not have is an equivalent of SXML's
> auxillary nodes, though I have not had a need for them yet.

Just checking: "auxilliary nodes"?  I get a bit lost with jargon.

> I could probably have used SXML as the underlying data type beneath WebIt!
> constructor's. But I really prefer working with structures instead.

There we differ.  I dislike them.

> It bothers me that once (href "something") has been extracted from a (@
> ...) node, there is no way to tell whether it is an attribute or an
> element. In WebIt!, there are separate structures: xml-attribute and
> xml-element.

Argh!  The distinction between XML attributes and child elements are
entirely arbitrary, aren't they?  Reflecting this duality seems entirely
fair to me.

> On the other hand, SXML can be a much more compact representation- which
> could matter a lot when you are dealing with megabytes (or gigabytes?) of
> XML.

Yes, we slosh lots of data about.

> As a "surface API" one of the benefits of WebIt! is it's treatment of XML 
> namespaces. [...]

Yes, it does seem so, but I need to know a bit more at how you match across
namespaces during the transformations before I'm convinced.

> parser, but producing WebIt! structures. (By the way- if you are
> interested in using WebIt! but need an XML parser, write to me. You might
> get this moved up my to-do list!)

I'm interested in WebIt and as soon as I get 30-hour days, I'll even try to
help out.  Current crisis is I'm revisiting my database problems all over
again... looking at Eli's ffi module as a possible elegant solution.

> Content-Type: text/html; charset="US-ASCII"

No HTML email, please.

MJR




Posted on the users mailing list.