Re: [xsl] *[@new='yes']

Subject: Re: [xsl] *[@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>

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
<xsl:import href="xxx.xsl">
<xsl:template match="*[@new='red']" >
<div style="color: red">

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 match="p[@new='red']">
  <xsl:call-template name="p-code"/>

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

 XSL-List info and archive:

Current Thread