Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
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 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
 
Old July 11th, 2014, 01:55 AM
Registered User
 
Join Date: Jul 2014
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Help needed to read the XML using XSLT

Hello Experts,

XML:

<si>
<t>Hello World</t>
</si>

To read the "Hello World" in aforementioned XML I use the following XSL,
<xsl:if test="$v_index">
<xsl:value-of select="$V_SHARED_STRING/sst/si[$v_index + 1]/t"/>
</xsl:if>

This is working perfectly..

In some cases, the XML would be like the below,
<si>
<r>
<t xml:space="preserve">Hello </t>
</r>

<r>
<rPr>
<u/>
<sz val="11"/>
<color theme="1"/>
<rFont val="Calibri"/>
<scheme val="minor"/>
</rPr>
<t>World</t>
</r>

<r>
<rPr>
<sz val="11"/>
<color theme="1"/>
<rFont val="Calibri"/>
<family val="2"/>
<scheme val="minor"/>
</rPr>
<t xml:space="preserve"> 123</t>
</r>
</si>

From the aforementioned I would like to read the string "Hello World 123".
CASE 1: Reading the string from node <t> --> Solved
CASE 2: Reading the string from node <r> concatenated with the values present in subnodes <t>

Could you help me to do CASE 1 and CASE 2 together?
Thanks a lot for help

Regards,
Benu





Similar Threads
Thread Thread Starter Forum Replies Last Post
Help needed transforming XML using multiple XSLT files. LenovoThinkCentre XSLT 2 August 28th, 2012 06:38 AM
Read XML apply XSLT and format the data navik_pathak XSLT 5 April 28th, 2009 11:43 AM
How to read this character in xml using xslt  shiv1981 XSLT 0 October 18th, 2005 01:11 PM
XSLT read through XML to transform another XML dendenx2 XSLT 8 July 7th, 2005 08:18 PM
simple xml / xslt example needed badgolfer ASP.NET 1.0 and 1.1 Basics 2 January 21st, 2005 02:10 AM





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