Subject: Re: Accessing command-line params from stylesheet From: Chris Maden <crism@xxxxxxx> Date: Wed, 17 Sep 1997 12:38:58 -0400 |
> Does this help: > > --- > -V variable > > This is equivalent to doing > > (define variable #t) > > except that this definition will take priority over any definition of > variable in a style-sheet. > --- > > (from jade.htm) > > This would be more convenient if it allowed you to specify a string, > but at least you can choose between strings using Boolean logic. Mmm... not really. (Disregard the private mail I just sent, Paul.) What I would like to be able to do is say, "Process all of Programming Perl, but only output MIF for the element with ID "PERL2-CH-7". Right now, I just have a small, fixed stylesheet: -=- ch07.dsl -=- <!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [ <!ENTITY db2mif PUBLIC "-//O'Reilly//NONSGML Stylesheet::DocBook 3.0 to MIF 5.0//EN" NDATA DSSSL> ]> <style-specification id="perl2-ch07" use="db2mif"> (define (element-to-process) (element-with-id "PERL2-CH-7")) <external-specification id="db2mif" document="db2mif"> -=- end -=- Since I'm using this with a Makefile, I can generate this stylesheet on the fly, but I'd rather not have to. If there were some way to either define a variable to an arbitrary value (like -DBUFSIZE=1024 in C compilers), I'd be set. I suppose I could have a whole bunch of (cond)s defining element-to- process differently depending on a whole set of variables (one for each chapter), and then -V one of them, but that would mean another stylesheet for every book, since they all have unique IDs. I think I'll have to have the Makefile build it on the fly for now. Thanks, Chris -- <!NOTATION SGML.Geek PUBLIC "-//Anonymous//NOTATION SGML Geek//EN"> <!ENTITY crism PUBLIC "-//O'Reilly//NONSGML Christopher R. Maden//EN" "<URL>http://www.oreilly.com/people/staff/crism/ <TEL>+1.617.499.7487 <USMAIL>90 Sherman Street, Cambridge, MA 02140 USA" NDATA SGML.Geek> DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: Accessing command-line params f, Paul Prescod | Thread | Re: Accessing command-line params f, Dave Love |
Re: Accessing command-line params f, Paul Prescod | Date | Re: Accessing command-line params f, Dave Love |
Month |