[xsl] Q - Parsing & Manipulating Strings from XSL

Subject: [xsl] Q - Parsing & Manipulating Strings from XSL
From: Ahsan Ali <doubleletter@xxxxxxxxx>
Date: Sun, 29 May 2005 17:59:22 +0400
Hi,

 I'm working on a (airline related) project in which I have following
dilemma:

 A soap response contains a complex hierarchy of data, in which, if
the departure time is 00:45 hours then it is represented as 45 ! To
make matters worse, the schema defines it as a string. I have no
influence over the schema since I'm querying a webservice. So I need
to pad that 45 with 0s and of course add that colon. Is there a way I
can do that in XSL ?

 Furthermore, in the same repsonse, I have a string of the format
YYYYNYY [chars may be either Y or N], also respresented as a free
format string. This represents the days of the week starting from
Sunday...  Now I need to take each char, and replace it with a <TD
color="green">S</TD> if it is Y, and <TD>S</TD> if it is N.

 Anyway I can do that in XSL ?

 My current solution is to access the above fields from the asp page,
and manipulate it in VBScript ! This is ugly and expensive as I need
to make a query for every _type_ of task...

 Any help is appreciated....

 Best Regards,

 Ahsan

Current Thread