IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.


#TechXchangePresenter
 View Only
Expand all | Collapse all

time conversion(XS:time?) using XSLT 1.0

  • 1.  time conversion(XS:time?) using XSLT 1.0

    Posted Tue June 28, 2005 12:08 AM

    Hi,

    I am trying to do the follg. using XSLT 1.0

    My input document contains time in hhmmss(military time) format. I want my xslt to transform this into XML time, w/t respect UTC, as given below in the example: (I am guessing that xs:time should be able to identify the current timezone, for e.g. -5 or -4 for EST).

    Does anyone know how to do this? (although, I can do this using string function, to concatenate a fixed offset, it will change by an hour during daylight savings time and this will cause error)

    Input:

    <?xml version="1.0" encoding="UTF-8"?> 132000

    Output:

    <?xml version="1.0" encoding="UTF-8"?> 13:20:00-05:00

    Thanks,
    Ken


    #API-Management
    #webMethods
    #Tamino


  • 2.  RE: time conversion(XS:time?) using XSLT 1.0

    Posted Mon July 18, 2005 05:46 PM

    I don’t believe you can do this in XSLT 1.0 except by using the string functions as you mentioned. If your XSLT processor supports extensions, you might take a look at the EXSLT date/time module (EXSLT - Dates and Times) to see if something in there might help.


    #API-Management
    #webMethods
    #Tamino