[cl-who-devel] Case sensitivity idea

Ken Harris kengruven at gmail.com
Tue Oct 28 19:29:22 UTC 2008


Hi again,

I'm using cl-who for generating a lot of HTML and lowercase XML, and a
tiny bit of mixed-case XML.  (I don't know who thought up mixed-case
XML schemas, but I swear it's not my fault.  For that matter, neither
is the XML.  :-)

To generate mixed-case XML, I should turn off *downcase-tokens-p*, and
then wrap every existing :foo like :|foo| in all my cl-who calls, just
to be able to generate a couple mixedCase XML attributes.  This idea
doesn't thrill me.  (Or I could change the readtable-case, but that'll
mean changing all my code to upper-case, and I'm not excited about
that, either.)

What if there was another mode (call it, say,
*downcase-tokens-unless-mixedcase-p*) for case handling, whose rule
was:
  - "downcase tokens, *unless* the token's string representation is
mixed-case (in which case leave it alone)"
That way, I could say (:a :href "/foo") like normal, but also
(:|feGaussianBlur| :|stdDeviation| 2), and everything would work like
it looks and like I want.

I suppose it would be impossible to generate all-uppercase tags in
this mode, but (a) I don't think I've ever seen an XML schema that
required any all-caps tags, and (b) in *downcase-tokens-p* mode, there
are tags it's impossible to generate, so I'm thinking "any tag in any
mode" isn't a strict requirement.

Thoughts?  I could whip up a patch, if somebody else thought this was
a decent approach...


- Ken




More information about the Cl-who-devel mailing list