This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: Yet more confusion over strings and objects in Lisp.
- From: "Kogule, Ryo" <aqua_dabbler at mac dot com>
- To: DocBook-APPS <docbook-apps at lists dot oasis-open dot org>
- Date: Tue, 25 Jun 2002 01:52:38 +0900
- Subject: Re: DOCBOOK-APPS: Yet more confusion over strings and objects in Lisp.
On 6/25/02 0:07, "Gre7g Luterman" <gre7g@wolfhome.com> wrote:
>> (make element gi: "DIV"
>> attributes: '(("CLASS" "NAVHEADER"))
>> (nav-context elemnode)
>> (if (string=? (nav-context elemnode) "") (empty-sosofo)
>> (make empty-element gi: "HR"
>> attributes: (list
>> (list "ALIGN" "LEFT")
>> (list "WIDTH" %gentext-nav-tblwidth%)))))
>
> Doesn't anyone know the correct Lisp code to do the above?
>
> It can't be too much more sophisticated than the above, can it?
I'm not sure "correct Lisp code" means but you can shorten list expressions
by using quasiquotation.
(make element gi: "DIV"
attributes: '(("CLASS" "NAVHEADER"))
(nav-context elemnode)
(if (string=? (nav-context elemnode) "") (empty-sosofo)
(make empty-element gi: "HR"
attributes: `(("ALIGN" "LEFT") ("WIDTH" ,%gentext-nav-tblwidth%)))))
Regards,
Kogulé, Ryo