sbutt 0 Newbie Poster

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.