|
Subject: Re: Probably a really dumb question... From: Paul Prescod <papresco@xxxxxxxxxxxxxxxxxxxxxxxxx> Date: Thu, 1 May 1997 11:45:30 -0400 (EDT) |
> I want to do something like:
>
> for x = 1 to number_of_FILENAME_children do
> output "file"+x
That would be the Perl or C way of doing it.
The "Scheme way" (which would work in DSSSL) would be to create a recursive
function.
The "DSSSL way" is to use a mode. I don't have time right now to teach
modes (and my tutorial on them is half constructed). But the basic idea is
that you can process the same DSSSL code in several ways:
(sosofo-append
(process-children) ; use "ordinary" construction rule
(with-mode mapping (process-children))) ; use special rule
(mode mapping
(element FILENAME ...))
Now the same elements get processed twice, first using the ordinary
construction rule, then using the construction rule in "mapping". Check
the DSSSL spec for (with-mode ...) and construction-rule-group s for
more information.
Paul Prescod
DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Probably a really dumb question..., Christopher Walsh | Thread | DSSSList policy question, Tony Graham |
| Probably a really dumb question..., Christopher Walsh | Date | DSSSList policy question, Tony Graham |
| Month |