Wrox Programmer Forums
| 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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #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!


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 10:15 AM
PHP GD - how to write bold and/or italic text starsol Beginning PHP 0 October 4th, 2005 03:12 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.