Subject: Re: [xsl] Only output element when parameter value is not equal to blank (or null) From: Abel Braaksma <abel.online@xxxxxxxxx> Date: Thu, 01 Feb 2007 13:11:22 +0100 |
I tried: <xsl:if test="exists($productid)"> <Attribute name="PRODUCTID" type="string"><xsl:value-of select="$productid"/></Attribute> </xsl:if>
but got the following error: 06:47:27.062 global (ERROR) - Uncaught Exception: 'exists' is not a valid XSLT or XPath function.
<xsl:param name="myparam" select="()" /> or <xsl:param name="myparam" select="/.." />
then this yields false: <xsl:if test="exists($myparam)" >....
<xsl:param name="myparam" select=" '' " /> or <xsl:param name="myparam" select="0" /> or <xsl:param name="myparam" />
then this yields true: <xsl:if test="exists($myparam)" >....
Cheers! -- Abel Braaksma
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Only output element when , Florent Georges | Thread | Re: [xsl] Only output element when , Chris Coyle |
Re: [xsl] Only output element when , Florent Georges | Date | Re: [xsl] Wrap changing element seq, Yves Forkl |
Month |