Subject: RE: How can you tell if a variable exists? From: Thuy Do <thuy@xxxxxxxxxxxxxx> Date: Tue, 2 Nov 1999 12:30:39 +1000 |
You could test for existing variable by this: <xsl:apply-templates select="your variable name" /> if it does exist then it will go to this loop <xsl:template match="your variable name"> ---whatever you wanted to do with the parameter </xsl:template> hope this help and good luck :-> Thuy -----Original Message----- From: Scott Sanders [SMTP:scott@xxxxxxxxxxxx] Sent: Tuesday, October 12, 1999 10:12 AM To: xsl-list@xxxxxxxxxxxxxxxx Subject: How can you tell if a variable exists? How can you tell if a variable exists (or rather does not exist), without erroring out of the stylesheet. For example: I am using the SAXON servlet to present HTML to the user. I am passing in the parameters from doPost to the stylesheet. If the parameters exist, all is well. But when a parameter does not exist, and is not passed to the stylesheet, I just get an exception. How do I prevent that? TIA, Scott Sanders XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: How can you tell if a variable , Scott Sanders | Thread | Re: How can you tell if a variable , Scott Sanders |
xsl:if testing elements (was: Re: S, John Robert Gardner | Date | New XT release, James Clark |
Month |