Re: Filtering nodes on other attributes

Subject: Re: Filtering nodes on other attributes
From: Jany Quintard <quintard.j@xxxxxx>
Date: Tue, 9 May 2000 10:36:33 +0200 (CEST)
On 8 May 2000, Gary Lawrence Murphy wrote:

> >>>>> "B" == Brandon Ibach <bibach@xxxxxxxxxxxxxx> writes:
>     B> Something like this should work:
> 
>     B> (element chapter (if (equal? STATUS (attribute-string
>     B> "status")) ($component$) (empty-sosofo)))
> 
> Thanks! This works when inserted, but it's still not quite as flexible
> as I need.  I want to have this controlled by a build-time variable
> such that the jade command
> 
>         jade -V STATUS=review ...
> 
> to generate only the chapters which have been released for review,
> whereas omitting the -V string would generate the entire book.  My
> naive approach is to make the definition conditional on the STATUS
> variable:
> 
>     (element chapter
>       (if STATUS
>           (if (equal? STATUS (attribute-string "status"))
>               ($component$) (empty-sosofo))
>           ($component$)))
This is what I would do, too.
 
> and for the most part, this works ... the only problem is the
> generated HTML TOC has a lot of dead links (but I can probably live
> with that for a while)
I suppose that the TOC is generated by processing <chapters> with a
special mode for it. Why do not you use the same coding to strip the dead
links in this mode ?

Jany.


 DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist


Current Thread