[plt-scheme] XML and Programming

From: Eli Barzilay (eli at barzilay.org)
Date: Thu Sep 5 10:54:36 EDT 2002

On Sep  4, MJ Ray wrote:
> How to encourage me not to read your email until it's about to expire. ;-)

Expiring email is pretty dangerous...


> > A better forum would probably be comp.lang.scheme, but (a) I'm talking
> > about stuff which is implemented in PLT, (b) I don't want to get dragged
> > to useless flamewars - people here (I think) are more focused...  [...]
> 
> No-one requires you to get dragged into the flamewars.

Heh, well, nobody ever requires you to get dragger to anything -- you
just get dragged to it yourself...


> Is putting (read-case-sensitive #t) in a module something which
> changes the system default?  If so, I think that's a bit arrogant.
> If not, why is it mentioned in the doc?  The doc is already quite
> long.

Yes it does change the defeault.  No, I don't think it's arrogant in
this context -- as HTML is itself going to a case sensitive direction,
these things will start to matter.  Yes, it is already mentioned in
the doc.


> > What just hit me is that this looks very much like what I'm using now
> > in Nuprl: the problem there is that I want to represent Nuprl syntax,
> 
> Nuprl?  Please tell me that's not what I think.

It is most likely not what you think.  Use Google.


> > avoiding fundamental changes to the system.
> 
> Aren't you already changing it fundamentally with :keywords?

I was talking about Nuprl, and the fact that adding a `quote' term
would be a huge change.  (And my definition of fundamentally is more
than the change of introducing :keywords.)


> > This restriction disqualifies a Scheme-like solution of a `quote'
> > (or `quasi-quote') context that prevents evaluation in its scope.
> > [...]
> 
> Excuse me while I rattle my head a bit to see if it really does
> prevent it entirely...

No need to rattle heads -- you can believe me, as I've been banging my
head on this issue for quite some time now.  Nuprl does not `evaluate'
in the Scheme sense -- it normalizes terms (I think you can find stuff
on evaluation vs. normalization around).  One design choice that it
has is that redexes can always be done -- and something like `quote'
will break that hard.


> There is an implementation of part of XSLT using SSAX, called STX.
> There are ways to do transformation-by-example of SXML, eg using
> match.  Of course, XSLT is Turing-complete, so Scheme itself could
> be said to be equivalent to it (wheeeeeee....) and all of the above
> are just using Scheme to transform XML anyway.

Yeah, well, being turing complete or not was never an issue, its the
way you get to do things which matters...


> > to what I have, I realized that this functionality is something that I
> > prefer over the general pattern transformations since the way I do it is
> > using standard Scheme code, which gives me an equivalent power. [snip!]
> 
> What is the deficiency that you perceive in using Scheme code to transform
> XML via SXML, either through syntax-rules, match, defmacro or some other
> way?

First of all, I *was* talking about the convenience of using standard
Scheme functionality like syntax rules and macros.  What disturbed me
was that SXML uses an additional mechanism for transformations, which
I couldn't fit in.  Now, I see how the two ways can live together.
Another part of my conclusion is that I prefer using Scheme bindings
to modify behavior (e.g, allowing you to rebind `b:' as a function).

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                  http://www.barzilay.org/                 Maze is Life!



Posted on the users mailing list.