I have some short form day names like so:
M -> Monday
T -> Tuesday
W -> Wednesday
R -> Thursday
F -> Friday
S -> Saturday
U -> Sunday
How can I convert an xml element like <days>MRF</days> into the long version <long-days>Monday,Thursday,Friday</long-days> using xslt?
Update from comments
Days will not be repeated
This stylesheet
With this input:
Output:
Edit: For those who wander, retaining the sequence order:
Note: Because days wouldn’t be repeated, this is the same as looking up for item existence in sequence with empty string separator.