[thelist] [XSL] Which is a better test?
Mark M
mark at safefrombees.com
Sun Mar 14 18:58:45 CST 2004
[slaps forehead]
I TRIED doing that but with a
<xsl:apply-template select="section[@display!='false']" >
but that wouldn't select anything that didn't have @display attribute!
That makes it so much easier, I couldn't find a reference to the 'not' keyword anywhere!
Not to mention that fixes up a few other issues as well.
Thanks!
Mark
------------------------------------------------------------------
mark at safefrombees.com
ICQ: 3094740
Safe From Bees
[ www.safefrombees.com ]
Quoting Steve Lewis <nepolon at worlddomination.net>:
> 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
> --
> * * Please support the community that supports you. * *
> http://evolt.org/help_support_evolt/
>
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !
>
>
>
More information about the thelist
mailing list