xsl-list
[Top] [All Lists]

RE: storing the result of a transformation in a param and evaluating the content

2004-11-22 20:06:55
try <xsl:if test="string-length(content)&gt;0">

best,
Tiffany_Blake(_at_)gap(_dot_)com

-----Original Message-----
From: Jean-François Lavigne [mailto:jf_lavigne(_at_)sympatico(_dot_)ca]
Sent: Monday, November 22, 2004 6:52 PM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] storing the result of a transformation in a param and
evaluating the content


Hello all,

If I store the result of a transformation into a variable, is there a way to
check this variable to see if it contains an element or nothing?

For example:

<xsl:template name="item">
  <xsl:param name="content">
    <xsl:apply-templates/>
  </xsl:param>
  <xsl:copy-of select="$content"/>
</xsl:template>

The copy-of element returns $content which is:

<world>hello</world>

What if the apply-templates element returned nothing and $content is empty.
Is there a way to check for this situation?

Thanks a lot.

J-F







--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--




--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



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