This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: *[@new='yes']
- To: xsl-list at lists dot mulberrytech dot com
- Subject: Re: [xsl] *[@new='yes']
- From: David Carlisle <davidc at nag dot co dot uk>
- Date: Tue, 6 Feb 2001 11:46:32 GMT
- References: <5.0.2.1.0.20010206114751.00b283b8@pop.tninet.se>
- Reply-To: xsl-list at lists dot mulberrytech dot com
You have a choice of plan a b c or d.
plan a)
in each template where it might apply, do an
<xsl:apply-templates select="@new"/>
then given
<xsl:template match="@new[.='yes']">
<xsl:attribute name="class">new</xsl:attribute>
</xsltemplate>
all you need is a bit of css to make that class go red.
plan b)
stick your original stylesheet in xxx.xsl then in yyy.xsl
have
<xsl:import href="xxx.xsl">
<xsl:template match="*[@new='red']" >
<div style="color: red">
<xsl:apply-imports/>
</div>
</xsl:template>
plan c)
put the main body of your code in a named template for each case
then have
<xsl:template match="p">
<xsl:call-template name="p-code"/>
</xsl:template>
<xsl:template match="p[@new='red']">
<div....
<xsl:call-template name="p-code"/>
</div>
</xsl:template>
plan d)
something else
_____________________________________________________________________
This message has been checked for all known viruses by Star Internet delivered
through the MessageLabs Virus Control Centre. For further information visit
http://www.star.net.uk/stats.asp
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list