xsl-list
[Top] [All Lists]

RE: RE: GMT to BST converter

2005-04-15 10:29:12
This is mainly an exercise in string parsing with a little arithmetic. I've 
done most of the template in XSLT 1.0, but I need a few pieces of information 
to complete it.

Will you pass parameters containing the dates of the beginning and ending date 
of Summer Time for the year in question or will the template be required to 
calculate this?

When the clock is turned back at the end of Summer Time, does the time then 
become 00:00:01 of the same day or is it set back to midnight of the previous 
day?

-- 
Charles Knell
cknell(_at_)onebox(_dot_)com - email



-----Original Message-----
From:     tom tom <tomxsllist(_at_)hotmail(_dot_)com>
Sent:     Fri, 15 Apr 2005 15:56:11 +0100
To:       xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject:  RE: [xsl] GMT to BST converter

I was visualising an XSLT template that accepts parameter(s), ie the 
date/time, and returns the same date/time adjusted if appropriate for BST. 
I'm figuring this is possible but incredibly convoluted. I was asking this 
community for help to save me the the hassle of writing it!

We're trying to avoid extension functions where possible as our stylesheets 
need to be portable. If it must be tied to a processor it should be LibXSLT. 
I'm presuming LibXSLT's inbuilt extension functions are not extensive enough 
to offer this....

I'm praying surely someone somewhere has written something that only 
requires an XSLT processor .....?

Thanks

Tom

From: "Michael Kay" <mike(_at_)saxonica(_dot_)com>
Reply-To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
To: <xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
Subject: RE: [xsl] GMT to BST converter
Date: Fri, 15 Apr 2005 13:04:38 +0100


Before you can convert the date/time you have to parse it. EXSLT has a
date:parse-date() function but it's not widely implemented. I think I would
escape out to an extension function for this one.

XSLT 2.0, for once, doesn't help you here, at least not directly.

Michael Kay
http://www.saxonica.com/


-----Original Message-----
From: tom tom [mailto:tomxsllist(_at_)hotmail(_dot_)com]
Sent: 15 April 2005 12:21
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] GMT to BST converter

I need to write a template in XSLT 1 that converts a GMT
feed, for example:

<Date>Tuesday, 18 February, 2003, 15:21 GMT</Date>

to British summer time. I don't want to have to update it
every 6 months!
Has anyone done this before?

Thanks

Tom

_________________________________________________________________
Want to block unwanted pop-ups? Download the free MSN Toolbar now!
http://toolbar.msn.co.uk/


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--





--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


_________________________________________________________________
Express yourself with cool new emoticons http://www.msn.co.uk/specials/myemo


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--




--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--