| |||||
XSL-T to convert ISO8601 date to RFC 822 dateThis is a partial implementation of an XSL-T template to covert from an ISO8601 date to an RFC 822 date. It isn't exactly correct, but it can serve as a starting point if you really need such a thing. I'm just posting it in case it might be useful to someone. I was going to use it to generate an RSS 2.0 feed, but decided to abandon it and just use Dublin Core dates that are already in ISO8601 format. This depends on the use of the EXSLT date functions.
<!-- Converts a date in ISO 8601 format into a date in RFC 822 format -->
<xsl:template name="rfc822Date">
<xsl:param name="isoDate"/>
<xsl:value-of select="date:day-abbreviation($isoDate)"/>, <xsl:value-of select="date:day-in-month($isoDate)"/><xsl:text> </xsl:text>
<xsl:value-of select="date:month-abbreviation($isoDate)"/><xsl:text> </xsl:text>
<xsl:value-of select="date:year($isoDate)"/><xsl:text> </xsl:text>
<!-- the timezone offset is currently hardcoded needs to be fixed -->
<xsl:value-of select="date:hour-in-day($isoDate)"/>:<xsl:value-of select="date:minute-in-hour($isoDate)"/>:<xsl:value-of select="date:second-in-minute($isoDate)"/> -0700
</xsl:template><p />
Posted by Kimbro Staken Tuesday Aug 26, 2003 at 3:08 AM | Recommended Sites JumpBox Virtual Appliances Virtualization Daily Grid7 Venturecast Inspirational Technology Scrollin on Dubs MC Ping - Microcontent Notfications
Archives
XML --
subscribe
Music -- subscribe Programming -- subscribe Python -- subscribe Syncato -- subscribe Photography -- subscribe Mac OS X -- subscribe General -- subscribe Canon EOS 1D -- subscribe Canon EOS 10D -- subscribe Canon EOS Digital Rebel -- subscribe Samsung Digimax V50 -- subscribe | ||||
Copyright 2002, 2003 Kimbro Staken
Powered By: Syncato 0.8 | |||||