|
Subject: Re: (dsssl) Dynamic defines From: "Francis J. Lacoste" <francis.lacoste@xxxxxxxxxx> Date: Mon, 26 Feb 2001 12:19:41 -0500 |
On Mon, Feb 26, 2001 at 08:45:41AM -0500, Devin Weaver wrote:
>
> I want to (define %show-comments% #t) only if status="draft"
> The problem is in my custom dsl the current-node has yet to be defined
> so there is no way for me to get at the attributs of book. and even if
> I did the root element can change. (Could be article, part, set, etc.)
>
> Anyone know how this could be done?
>
You could try the following :
(root
(let* ((root-node (node-property 'document-element (current-node)
default: (empty-node-list)))
(status (attribute-string "status" root-node))
(%show-comment (equal? status "draft")))
(process-node-list root-node)))
Normally, this local binding of %show-comment% should override the
global one.
Hope this works
--
Francis J. Lacoste
francis@xxxxxxxxxx
Attachment:
pgp00001.pgp
Description: PGP signature
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| (dsssl) Dynamic defines, Devin Weaver | Thread | Re: (dsssl) Dynamic defines, Russell O'Connor |
| (dsssl) Dynamic defines, Devin Weaver | Date | Re: (dsssl) Dynamic defines, Russell O'Connor |
| Month |