Check if a parameter exists in XSLT before using it

ozgurland

New Member
I am using XPATH to work out if my parameter $test exists.I am using the XPATH builder in ALtova Stylevision and thought I could use something like\[code\]exists ( $blah)\[/code\] or \[code\]exists ( string($blah) )\[/code\]But this ends with \[code\]" Undefined variable in expression test="exists( string( $blah) )""\[/code\]The issue is that sometimes the parameter will exist, and sometimes it won't. I don't want to have to hardcode in a blank parameter! Is there a way I can say "Check if the parameter XXXX exists" before I use it? It's frustrating as I know how to do this in pretty much every other programming languageParameter defined:\[code\]<xsl:param name="blah"> some text </xsl:param>\[/code\]These parameters are read in from a seperate file "parameters.xslt". This file may or may not exist, depending on the scenario. I need to check the param actually exists before I attempt to use it.
 
Back
Top