Re: (dsssl) Re: DOCBOOK-APPS: Dynamic DSSSL

Subject: Re: (dsssl) Re: DOCBOOK-APPS: Dynamic DSSSL
From: Brandon Ibach <bibach@xxxxxxxxxxxxxx>
Date: Mon, 19 Feb 2001 07:36:31 -0600
Quoting Adam Di Carlo <adam@xxxxxxxxxxx>:
> Devin Weaver <ktohg@xxxxxxxxxxxxx> writes:
> > I'm not that great at DSSSL. I'm still learning.
> > I was wondering how could I query the value of the status attribute in
> > the top tag. Either <book>, <article>, <set>, or <part>
> > 
> > What I want to do is if I have <book status="draft"> have
> > (define %show-comments% #t)
> > but if it's <book status="final"> have
> > (define %show-comments% #f)
> > 
> > Is this possible?
   Untested, but here goes:

(define docelem (lambda (#!optional (n (current-node)))
  (node-property 'document-element (node-property 'grove-root n))))

(define %show-comments%
  (string=? "draft" (attribute-string "status" (docelem))))

   Let me know if this doesn't work (not sure about the behavior of
current-node at the top level).

-Brandon :)

 DSSSList info and archive:

Current Thread