[xslt] Testing if parameters exist

I imagine this idea might be a little bit heretical but I'm using xsltproc 
and was wondering if is there a way to test if a stylesheet parameter or 
variable is defined/exists without xsltproc erroring out trying to evaluate 

This may initially sound like a silly idea since all parameters would appear 
to be always well defined at stylesheet 'write-time'. However, if parameters 
are dynamically evaluated based on the input document (think 
dyn:evaluate(concat('$', $varname)) ), then in this is not the case anymore.
Being able to evaluate the existence of parameters without causing an error 
would be useful in this situation by providing a mechanism for backwards 
compatibility of input documents with older stylesheets.



STOP MORE SPAM with the new MSN 8 and get 2 months FREE* 

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]