XSLTGeneral 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.
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>
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
The Following User Says Thank You to mhkay For This Useful Post: