[xsl] select="if (subelement) then subelement else 'string'"

Subject: [xsl] select="if (subelement) then subelement else 'string'"
From: Kevin Rodgers <kevin.rodgers@xxxxxxx>
Date: Wed, 2 Feb 2005 17:23:45 -0700
Currently I call a template with this parameter:

    <xsl:with-param name="page-count"
       select="if (pages) then pages else '0'"/>

Is there a simpler or more efficient way to provide '0' when the
pages subelement isn't present (or 0, since the template outputs
it via xsl:value-of)?

Thanks,
-- 
Kevin Rodgers

Current Thread