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 August 7th, 2006, 09:34 AM
Authorized User
 
Join Date: Aug 2006
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to concatenate two values into one field


Example:

Cancatenate Field1 and Field2
<Field1>1234<Field1>
<Field2>456789<Field2>

To
<Field3>1234-456789<Field3>

Thanks in advance!

 
Old August 7th, 2006, 09:35 AM
Authorized User
 
Join Date: Jun 2006
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Default

<xsl:value-of select="concat(Field1,'-',Field2)" />

 
Old August 7th, 2006, 09:36 AM
Authorized User
 
Join Date: Aug 2006
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you very much!

 
Old November 7th, 2016, 02:33 PM
Registered User
 
Join Date: Nov 2016
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Is it possible to also style the fields within the concatenation?

e.g <xsl:value-of select="concat(<strong>Field1</strong>,'-',Field2)" />

to output Field1(bold)-Field2(normal)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Need to concatenate values in a loop LeoMathew XSLT 6 February 14th, 2008 09:03 AM
Multiple Values In One Field lefty4080 Access 1 December 12th, 2007 08:59 AM
get the values of form field values crmpicco Perl 2 March 16th, 2007 10:57 AM
Selecting on different values of the same field alphahamster SQL Language 4 May 30th, 2006 11:08 AM
Parsing values out of a field 12th_Man Oracle 1 March 3rd, 2005 10:51 AM





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