Subject: Re: *[@new='yes']
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 6 Feb 2001 11:46:32 GMT
|
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
|