Re: Re: case-sensitivity of special symbols in SXML

"Neil W. Van Dyke" <[email protected]> Tue, 1 Feb 2005 14:20:07 -0500
Newsgroups gmane.lisp.scheme.ssax-sxml
Message-ID <[email protected]>
Michael Sperber <sperber-jNDFPZUTrfQQDnmTUQnR1uqEdJ8o/[email protected]> writes at 18:23 01-Feb-2005 +0100:
> Neil> 1. The SSAX packaging for the Scheme implementation that I use most
> Neil>    often (MzScheme 209) has switched to emitting lowercase "*top*" (and
> Neil>    related SXML symbols).
> 
> I don't know what you mean by "has switched".  The packaging that has
> been merged into the PLT distribution has always been case-insensitive.

All of the packagings of SSAX that I've heard of being used by PLT
MzScheme/DrScheme 200-series users for the last few years (i.e., my
".plt", Kirill Lisovsky's ".plt", and Dmitry Lizorkin's PLaneT) have
each made a point to read the SSAX code with in case-sensitive mode.

    http://www.neilvandyke.org/ssax-plt/
    http://www.pair.com/lisovsky/xml/ssax/
    http://planet.plt-scheme.org/#ssax.plt

I was pleasantly surprised that PLT 209 included an "ssax" collection,
then quickly horrified that this fascinating new packaging cheerfully
declined to be what I considered a good case-sensitive neighbor in
PLT-ville.  (And it was grabbing the "ssax" collection name, so I
couldn't just install Kirill's trusty SSAX ".plt".)

> Unfrotunately, the converse problem is just about the same: Were *TOP*
> case-sensitive, I couldn't refer to it by *TOP* in case-insensitive
> code.  Instead, I'd have to say (string->symbol "*TOP*") or something.
> 
> I see your dilemma, but I don't see a solution that fits everyone's
> needs.

The workaround you mention is exactly what I have done in my portable
SXML-related libraries.  It has not been a big deal, and (in the past)
made my libraries work for the most people, including people who prefer
to write their own code in case-insensitive mode even though their SSAX
packaging has been compiled in case-sensitive mode.

I think we might be bumping into the discussion over whether Scheme
implementations in general should be case-sensitive at all.

Putting that aside for a moment, there's another question, which is
whether or not textual SXML *external* to a Scheme environment (say, in
a file, or being transmitted through a socket) is case-sensitive.  If
this externalization is covered by the SXML specification, then all
tokens in a representation are case-sensitive *except* for the few like
"*TOP*".  Not only would that seem a little odd from a language design
point-of-view, but you'd have to go through contortions to read that
language with a Scheme reader (if your reader is case-sensitive, I mean;
if your reader is case-insensitive, you have to write a new reader).

If we go back to Scheme representation of SXML now-- if only the case of
those few remaining symbols in SXML were fixed, like all the other
symbols in SXML, then any old case-sensitive Scheme reader could read
externalized SXML.

-- 
                                             http://www.neilvandyke.org/


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl