xsl-list
[Top] [All Lists]

xsl:param

2003-06-06 04:34:10

Is there a way to declare an xsl:param based on the name of the parameter
passed to it?

I.e.  if we are passing foo=1 and bar=2 to the stylesheet we would
usually do something like:
<xsl:param name="foo">default</xsl:param>
<xsl:param name="bar">default</xsl:param>

Let's say you are passing a large number of parameters, and you
can't know in advance (for some hypothetical reason) what
their names are going to be.

Is there a way to do something like:
<xsl:param name="*">default for everything</xsl:param>

And if you passed a parameter of foo=1, then it would create
the xsl:param $foo with value 1, and if you also passed it
blort=wibble it would also create $blort equaling wibble.
Is it then possible to test for the existence (or lack) of
that parameter?

I realise it is a silly (and hypothetical) question, but
one of those things that occured to me (will still looking
at that merging readings problem from several days back).

-James

-- 
Dr James Cummings, James(_dot_)Cummings(_at_)uea(_dot_)ac(_dot_)uk, 
http://www.uea.ac.uk/~q503
Cursus Project, School of Music, University of East Anglia,
Norwich, Norfolk, NR4 7TJ, UK  Tel:(01603)593-595



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>