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 March 27th, 2014, 07:10 AM
Authorized User
 
Join Date: Jun 2012
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default Concatenate

Hi

here is the input file,

<ab @cr0m="abc">
<a>
<b>text</b>
</a>
<c>text2</c>
</ab>



want to concatenate <b> and <c> which is outside to <a>

output as <abc>text + text 2</abc>

Last edited by xsltstarter; March 27th, 2014 at 07:17 AM..
 
Old March 27th, 2014, 07:15 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

Can you show what you want the output to look like?

Can you explain what you have tried and why you are finding the problem difficult?
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
 
Old March 28th, 2014, 05:35 AM
Authorized User
 
Join Date: Jun 2012
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by mhkay View Post
Can you show what you want the output to look like?

Can you explain what you have tried and why you are finding the problem difficult?

to be specific for example when i'm calling <a> element, how can i can call <c> in element to concatenate in to it
<xsl:template match="a">
<xsl:value-of select="b"/>
</xsl:template>
 
Old March 28th, 2014, 05:40 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

Add
Code:
<xsl:value-of select="following-sibling::c[1]"/>
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference





Similar Threads
Thread Thread Starter Forum Replies Last Post
Concatenate error lmryckman Access 1 March 13th, 2014 10:41 AM
Concatenate help lryckman Access VBA 3 October 12th, 2009 08:52 AM
Concatenate Rows stonesbg ASP.NET 2.0 Basics 5 February 6th, 2007 06:12 PM
Argh! Why does this concatenate? interrupt Javascript How-To 1 August 13th, 2005 08:44 AM
string concatenate phelkuizon Classic ASP Databases 1 September 13th, 2004 04:08 AM





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