Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: XSL - Date/Time string requires formatting based on value in another element

From: "Rob W" <Whllrob@---.--->
To: NULL
Date: 11/9/2007 2:48:00 PM

Im using XMLSpy 2007, its part of a university assignment and I must only 
use XSL/XST on a windows platform to implement the solution and for the 
output to be HTML.

I was thinking but dont have the technical knowledge to appy it :-

datetime = 12/01/07 14:05
$Hour 
=substring(my:PODBatch/my:POD/my:DeliveryInfo/my:DeliveryDateTime,10,2)  = 
14

TimeZone = GMT+2
$Timezonedifference = 
substring(my:PODBatch/my:POD/my:Customer/myTimeZone,4,1) = 2

Then would have to peform a calculation to ensure the hour is added on 
correctly using 24 hour clock i.e.  23:05 00:05

Then replace the new value back into the datetime element.
Hope this makes sense and thanks for your help.

Cheers
Rob









"Anthony Jones" <Ant@y...> wrote in message 
news:%23wc7FvtIIHA.1184@T......
> "Rob W" <Whllrob@a...> wrote in message
> news:OywtlStIIHA.4228@T......
>> 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.
>>
>
>
> There is more to it than that what if you need to add 3 hours to 22:00?
> Won't you need to upgrade the date?  What if the date is 31/12/07?
>
> What flavour of XSL are you using?  Does the solution need to stick 
> strictly
> to what XSL provides or are you happy to use a platform specific 
> extension?
> What is your platform?
>
>
> -- 
> Anthony Jones - MVP ASP/ASP.NET
>
> 




transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent