This is the mail archive of the
docbook@lists.oasis-open.org
mailing list for the DocBook project.
Re: DocBook XSL: <xsl:variable> and <xsl:param>
At 8:43 AM -0500 3/24/00, Norman Walsh wrote:
>Uh, maybe. Sounds plausible anyway. But the DocBook stylesheets are
>highly modular and I'm not clear on what the scope of xsl:param would
>be in the case where they're used in param.xsl which is included in
>docbook.xsl. I probably ought to check...
As I understand it, param.xsl provides default settings for a whole
bunch of parameters. Right now, they're variables, which, in XSLT's
definition of "variable", basically means "constants". Although XT
seems to let you override their settings from the outside, I don't
think this behavior is standard.
If we assume that standard XSLT processors will be used, then the
procedure for parameterizing the behavior of DocBook XSL stylesheets
(other than actually editing the templates themselves) is essentially
to edit the param.xsl file.
However, if param.xsl were to change so that it actually contained
parameters (xsl:param) instead of variables (xsl:variable) then you
could leave param.xsl as it is, and pass in values just to override
the defaults. You could then easily use a single installation of the
stylesheets and have dynamically different output depending on the
needs for a given invocation of the processor.
I suppose that I should now put my money where my mouth is and try
changing them all to xsl:param to see if it works. I'll try to get
to that today, as soon as I download 1.9 and integrate our local
modifications.
--
+-------------------------------------------------------------------+
| Dave Makower <davemak@iclick.com> |
| Manager of Portal Architecture & Development |
+--------------------------------+----------------------------------+
| iClick, Inc. | (914) 872-8030 |
| 120 Bloomingdale Road | (914) 872-8100 fax |
| 3rd Floor | (914) 872-8000 main |
| White Plains, NY 10605 | http://www.iclick.com/ |
+--------------------------------+----------------------------------+