Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
| Search | Today's Posts | Mark Forums Read
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 November 23rd, 2007, 07:49 AM
Registered User
Join Date: Nov 2007
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default XSLT TRIM Function

Hi Abhishek,

We have a requirement like implement the mapping functiality like if value(A) NOT NULL then left(right(rtrim(VALUE),3),2) between A( input) and B ( output).

And I'll give the example input also for the functionality.

INPUT: APPLE ---> After Transformation --> Output: PL

Condition: if value(A) NOT NULL then left(right(rtrim(VALUE),3),2) ;

So, how can we write the code in xslt?!!

Do the needful...


Old November 23rd, 2007, 08:39 AM
mhkay's Avatar
Wrox Author
Points: 18,487, Level: 59
Points: 18,487, Level: 59 Points: 18,487, Level: 59 Points: 18,487, Level: 59
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts

It's about 15 years since I wrote in Basic, so I don't have a very clear recollection of what left() and right() and rtrim() do (this is Basic, yes?). Perhaps you could rephrase the question in a way that saves me having to look it up?

Michael Kay
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference

Similar Threads
Thread Thread Starter Forum Replies Last Post
How can i trim space using XSLT? Mitali XSLT 5 July 25th, 2008 03:15 PM
TRIM, ISTEXT function won't work in Excel VBA code munzer1 Excel VBA 1 May 29th, 2007 09:35 AM
contains function in XSLT 1.0 NEO1976 XSLT 4 February 7th, 2007 06:01 AM
trim function on page 206 jackhsu BOOK: Professional JavaScript for Web Developers ISBN: 978-0-7645-7908-0 1 December 19th, 2006 01:46 PM
custom JavaScript Trim function crmpicco Javascript How-To 2 January 18th, 2006 12:53 PM

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