[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: *[@new='yes']

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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.