Correct syntax for case?

Subject: Correct syntax for case?
From: Georg Rehm <georg@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 28 Apr 1998 11:39:18 +0200 (MEST)
Hi there,

I have a couple of (if ...)s in a DSSSL script to trigger different
styles for different values of an attribute, looks like this:

(element paragraph
        (if (equal? (attribute-string "FKT") "P")
          (make element gi: "P")
          (if (equal? (attribute-string "FKT") "H1")
            (make element gi: "H1" attributes: *heading-style*)
            (if (equal? (attribute-string "FKT") "H2")
              (make element gi: "H2" attributes: *heading-style*)
              (if (equal? (attribute-string "FKT") "H3")

Of course, this code is a pain in the neck and the only reason for
not using "case" is that I wasn't able to figure out what the correct
syntax for "case" is. So, can someone provide me with a rough blueprint
of the above code in "case"-style?

Thanks in advance, greetings,
Georg Rehm                                     georg@xxxxxxxxxxxxxxxxxxxxxxx
Institute for Semantic Information-Processing, University of Osnabrueck, FRG

 DSSSList info and archive:

Current Thread
  • Correct syntax for case?
    • Georg Rehm - from mail1.ability.netby (8.8.5/8.6.12) with ESMTP id FAA10714Tue, 28 Apr 1998 05:45:45 -0400 (EDT) <=
      • Heiko Kirschke - from mail1.ability.netby (8.8.5/8.6.12) with ESMTP id GAA11198Tue, 28 Apr 1998 06:34:16 -0400 (EDT)