p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Go Back   p2p.wrox.com Forums > XML > XSLT
I forgot my password Register Now
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.

Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 30th, 2009, 11:50 AM
Authorized User
Points: 42, Level: 1
Points: 42, Level: 1 Points: 42, Level: 1 Points: 42, Level: 1
Activity: 10%
Activity: 10% Activity: 10% Activity: 10%
 
Join Date: May 2008
Location: Chennai, Tamil nadu, India.
Posts: 10
Thanks: 3
Thanked 0 Times in 0 Posts
Send a message via Yahoo to rangeshram
Default Display attribute and particular string in different color

Hi All,

We need to change the attribute color of the particular element and particular string (original content) in this case should be differentiated in xslt.

e.g.,
<footnote num="16" int="Replace this footnote with the following">This is the 16th footnote with the original content and speaks about Banking Act 1973 (Act 102) (repealed)</footnote>
<footnote num="17" int="Replace this footnote with the following">This is the 16th footnote and speaks about Banking Act 1973 (Act 102) (repealed)</footnote>

o/p:
<p>Replace this footnote with the following his is the 16th footnote with the original content and speaks about Banking Act 1973 (Act 102) (repealed)</p>

<p>Replace this footnote with the following This is the 16th footnote and speaks about Banking Act 1973 (Act 102) (repealed)</p>

my xslt code:

<xsl:template match="footnote">
<p><font color='darkred'><b><xsl:value-of select="@int"/></b></font></p>
<xsl:apply-templates/>
</xsl:template>

But my problem is just convert first instance of footnote rest of the footnotes were skipped. please help..

Thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old October 30th, 2009, 07:49 PM
mhkay's Avatar
Wrox Author
Points: 12,738, Level: 48
Points: 12,738, Level: 48 Points: 12,738, Level: 48 Points: 12,738, Level: 48
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 3,924
Thanks: 0
Thanked 82 Times in 80 Posts
Default

It looks as if the template is only being applied to the first footnote. To find the error in your code you need to look for the apply-templates instruction that selects footnotes and causes templates to be applied to them. There's nothing wrong with the footnote template itself - it just isn't being called.
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
The Following User Says Thank You to mhkay For This Useful Post:
rangeshram (October 31st, 2009)
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
extract string from value of attribute camacho XSLT 1 August 16th, 2007 03:44 AM
how to display color palette swati_joshi ASP.NET 1.0 and 1.1 Basics 0 March 28th, 2006 04:32 AM
Invalid Connection String Attribute rstelma Classic ASP Databases 8 July 6th, 2005 07:31 PM
color attribute with <li> econophil HTML Code Clinic 2 August 31st, 2004 03:22 PM
display different color in loop mateenmohd Classic ASP Basics 2 June 16th, 2004 07:40 AM



All times are GMT -4. The time now is 08:10 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc