Case independence and (case)

Subject: Case independence and (case)
From: Chris Maden <crism@xxxxxxx>
Date: Fri, 17 Apr 1998 12:56:41 -0400
I'm returning to the HTML table stylesheet I released last October,
trying to make it independent of the SGML declaration in effect (so
that it's usable with XML, for instance).  DSSSL automatically
normalizes the GI in the element construction rules, but most other
string comparisons are case sensitive; comparing GIs or attribute name
token values, or looking for ancestors or attributes is case
sensitive.  I'm using (general-name-normalize) to make this
independent of the declaration:

(if (equal? (gi (current-node))
	    (norm "colgroup"))
...

where

(define (norm str)
  (general-name-normalize str
			  (current-node)))

However, I use a lot of (case) statements on attribute values, where
the value is a name token.  The case keys are defined as _datum_,
which means that I can't use an expression.  How can I do something
like

(case (attribute-string (norm "align")
			(current-node))
      (((norm "left") 'start))
      (((norm "center") 'center))
      (((norm "right")
	(norm "char") 'end))
      (((norm "justify") 'justify))
      (else (inherited-quadding)))

except without an expression and in a case-independent way?  The
attribute value has already been normalized, but I don't know to
what.  With the reference concrete syntax, it'll be all-caps, but with
XML it'll be exactly as entered or as defaulted in the DTD.

-Chris
-- 
<!NOTATION SGML.Geek PUBLIC "-//Anonymous//NOTATION SGML Geek//EN">
<!ENTITY crism PUBLIC "-//O'Reilly//NONSGML Christopher R. Maden//EN"
"<URL>http://www.oreilly.com/people/staff/crism/ <TEL>+1.617.499.7487
<USMAIL>90 Sherman Street, Cambridge, MA 02140 USA" NDATA SGML.Geek>


 DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist


Current Thread
  • Case independence and (case)
    • Chris Maden - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id MAA29056Fri, 17 Apr 1998 12:59:06 -0400 (EDT) <=
      • Henry S. Thompson - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id QAA01423Fri, 17 Apr 1998 16:06:49 -0400 (EDT)
        • Chris Maden - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id QAA01928Fri, 17 Apr 1998 16:32:27 -0400 (EDT)
      • <Possible follow-ups>
      • Reynolds, Gregg - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id QAA02506Fri, 17 Apr 1998 16:59:50 -0400 (EDT)
        • Chris Maden - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id RAA02755Fri, 17 Apr 1998 17:11:13 -0400 (EDT)