Next in thread → Next in month →

Re: DOCBOOK-APPS: Yet more confusion over strings and objects in Lisp.

From
Gre7g Luterman <>
Date
2002-06-24T17:11:11+00:00
ID
3D16FEA7.12640.237A5472@localhost
Thread
Re: DOCBOOK-APPS: Yet more confusion over strings and objects in Lisp.
> 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%)))))

I'm sorry.  Perhaps my earlier question got lost.  By "correct Lisp 
code" I mean that the above block does not work.  As I mentioned 
before, the problem is the:

(if (string=? (nav-context elemnode) "")

part.  (nav-context elemnode) returns an object, not a string.  So 
how do I compare it against ""?  I'm sure there must be a way, but I 
have no idea.  The only other similar comparison I know is node-list-
empty? and that doesn't seem to work either.

Does anyone know how to compare whether (nav-context elemnode) will 
return text?

Gre7g.

=================================================================
Gre7g Luterman     http://www.templeofluna.com/
Stay informed: http://www.templeofluna.com/keeper/mailinglist.htm
                      Into each wound, a little salt must fall...
Next in thread → Next in month →