[thelist] [XSL] Which is a better test?
Steve Lewis
nepolon at worlddomination.net
Sun Mar 14 18:46:01 CST 2004
Mark M wrote:
> If @display='true' it displays
> If @display='false' it doesn't display
> and if there is no @display, it DOES display. (So default value is true)
>
> The question is - which is a better way to remove the @display='false' sections via XSL -
Neither?
You did not include the calling template, but lets pretend. Here is
how I would to that.
<xsl:template match="siteNav">
<!-- do some stuff -->
<!-- draw the 'displayed' sections -->
<xsl:apply-template select="section[not(@display='false')]"
mode="enabled" />
<!-- do some more stuff -->
</xsl:template>
<xsl:template match="section" mode="enabled">
<!-- draw nav bar -->
</xsl:template>
Steve
More information about the thelist
mailing list