Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition ISBN: 978-0-470-19274-0
This is the forum to discuss the Wrox book XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition by Michael Kay; ISBN: 9780470192740
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition ISBN: 978-0-470-19274-0 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old September 23rd, 2014, 11:29 AM
Registered User
Points: 10, Level: 1
Points: 10, Level: 1 Points: 10, Level: 1 Points: 10, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2014
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to bold some specific text in SXLT

Hello,

Here is my XML code:
<code>
<?xml version="1.0" encoding="utf-16"?>
<Message>
<ItemTypeGroup Id="0" Name="All Attributes">
<Statements Id="13" Name="Allergen Tag Format">
<Statement Id="102">Bold</Statement>
</Statements>
<TaggedLongTextItems Id="177" Name="Ingredients">
<Text xml:space="preserve">The Ingredients of the product</Text>
<Text xml:space="preserve">Milk Chocolate</Text>
<Text xml:space="preserve">Sugar</Text>
<Text xml:space="preserve">Vegetable Oil</Text>
<Text xml:space="preserve">Wheat Flour</Text>
<Text xml:space="preserve">Hazelnuts (10.8%)</Text>
<Text xml:space="preserve">Skimmed Milk Powder</Text>
<Text xml:space="preserve">Whole Milk Powder</Text>
<Text xml:space="preserve">Vanillin</Text>
<Text xml:space="preserve">Total Milk Solids: 19.5%</Text>
<Tags>
<Tag TextIndex="1" StartIndex="0" Length="4" TagTypeId="1" TagType="Allergen As On Pack" />
<Tag TextIndex="4" StartIndex="0" Length="11" TagTypeId="1" TagType="Allergen As On Pack" />
</Tags>
</TaggedLongTextItems>
</ItemTypeGroup>
</Message>

</code>

My question is: I need to transform it in XSLT and to display all the ingredients but for the tag with index 1 (Milk Chocolate) started wit index 0 for a length of 4 to be applied the style bold present in the Statements /Statement Id = 102. The same for the second one.

Please can you help me?
Thank you very much!
Reply With Quote
Reply


Thread Tools
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Bold the text of the LinkButton,which is clicked, in DatList Manoj Bisht Visual Studio 2008 2 July 8th, 2009 03:09 AM
convert text to bold/italic/underline arunkhushi General .NET 0 August 21st, 2007 04:07 PM
How to fetch text after specific tag text dipsut XSLT 10 May 23rd, 2007 02:57 PM
Changing between bold and plain text in a text box funkybuddha Access 2 January 3rd, 2006 09:15 AM
PHP GD - how to write bold and/or italic text starsol Beginning PHP 0 October 4th, 2005 03:12 AM



All times are GMT -4. The time now is 06:44 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.