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 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
>
> 




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