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 October 25th, 2011, 12:02 PM
Authorized User
 
Join Date: May 2009
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Default Matching and Conversion

Hi folks,
i need some help generating some simple xslt script for the following problem:

TRH room code TT room code
ABCD PABCD
aBCD AABCD
AbCD BABCD
abCD CABCD
ABcD DABCD
aBcD EABCD
AbcD FABCD
abcD GABCD
ABCd HABCD
aBCd IABCD
AbCd JABCD
abCd KABCD
ABcd LABCD
aBcd MABCD
Abcd NABCD
abcd OABCD

In this scenario the first character of 'TT room code' decides how the next 4 characters would be devised and correspondingly generate 'TRH room code'.

For example, if the 'TT room code' is 'PABCD', here its first character 'P' means that the remaining 4 characters 'ABCD' would be copied as it is and represent 'ABCD' as 'TRH room code'.

Similarly, when it is 'AABCD', the first 'A' represents the conversion to 'aBCD' as 'TRH room code'. In this case the first 'A' means changing the character case of the 2nd character to small, while keeping the others as it is.

And so are the other rules.

In short, the first character [A-P] represents the masking character, which effects the behaviour in terms of character's case (upper/lower) of the next 4 characters which could be any be it ABCD or UBFG or DEFG etc.

For example: AUBFG would become uBFG.

And CDEFG would become deFG.

I hope i have clarified the problem.

Thanks.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Matching Whitespace iceandrews XSLT 3 October 27th, 2010 12:49 PM
Matching query - stumped SQLScott SQL Server 2005 9 December 6th, 2007 12:01 PM
Matching two strings jamie_t VB How-To 0 October 12th, 2005 03:40 AM
Finding a matching value Morry Excel VBA 2 March 26th, 2004 05:32 AM
Matching of attribute values gb XSLT 2 February 10th, 2004 04:12 AM





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