Re: Testing if an attribute is present

Subject: Re: Testing if an attribute is present
From: Dave Love <>
Date: 27 Oct 1997 20:23:00 +0000
>>>>> "Aidan" == Aidan Killian <aidan@xxxxxxxx> writes:

 Aidan> jade:metafilter.dsl:79:2:E: 1st argument for primitive "literal" of
 Aidan> wrong type: "#f" not a string

That error's clearly not from the posted code, since in the only call
of `literal', `(output-date)' must return a string (or raise an
error).  The fragment posted would run in Jade in the appropriate
context -- and do (presumably) the right thing, though the `make
sequence' seems superfluous.

>>>>> "Vivek" == Vivek Agrawala <vivek@xxxxxxxxxxxxxxx> writes:

 Vivek> (define (get-str-attr-no-err attr-nm snl)
 Vivek>   (let ((a-str (attribute-string attr-nm snl)))
 Vivek>     (if (equal? a-str #f) "" a-str) ))

FWIW, you might replace the body with the idiom:
  (or (attribute-string attr-nm snl) "")

 DSSSList info and archive:

Current Thread