Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Re: XSL - Date/Time string requires formatting based on value in another element >Thread Next - Re: XSL - Date/Time string requires formatting based on value in another element Re: XSL - Date/Time string requires formatting based on value in another elementTo: NULL Date: 11/9/2007 1:27:00 PM
I've set up the date & time (dd/mm/yy hh:mm) in my XML schema as a string
and within my XSL stylesheet I would like to use substring to grab
the hh element, store it as a integer variable.
The take the last character from time zone element i.e GMT+1, GMT+2 =1,2 to
grab the number store this as an integer value.
Peform calculation and then replace the hh element within the date & time
element with the newly calcualte one.
Hope this makes sense.
Rob
"Anthony Jones" <Ant@y...> wrote in message
news:eO3LBFtIIHA.2268@T......
> "Rob W" <Whllrob@a...> wrote in message
> news:eApB5sNIIHA.5352@T......
>> Greetings again,
>>
>> My schema consists of an element called deliverydatetime which is a
>> string
>> (due to require the exact formatting of dd/mm/yy hh:mm) regular pattern
>> attached to this is:-
>>
>>
> ((31/(0[13578]|1[02])/(\d{2}))|((0[1-9]|[12]\d|30)/(0[13456789]|1[012])/(\d{
> 2}))|((0[1-9]|1\d|2[0-8])/02/(\d{2}))|(29/02/((0[048]|[2468][048]|[13579][26
> ]))))(([01]\d)|(2[0-3])):[0-5]\d
>>
>> This will always be the current correct time for the United Kingdom i.e.
>> GMT/BST(GMT+1)
>>
>> However in my XML is an optional field called timezone , if present based
> on
>> customer type then has the values (GMT+1, GMT+2, GMT+3) if these are
>> present I would like to modify the value in XSL of the deliverydatetime
>> string.
>>
>> It will add a value onto the hh (hour) part of the string.
>>
>> I feel I may have chosen the wrong element types to work with, however I
>> couldn't understand XML own timezone functions, lost me completely.
>>
>> Can anyone suggest a way forward?
>>
>
> XML doesn't have any timezone functions. XML is just the data. If you
> need
> to mutate that data you need program code to do that. What language are
> you
> using?
>
>
> --
> Anthony Jones - MVP ASP/ASP.NET
>
>
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
