This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: *[@new='yes']



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]