This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: String manipulation question
- From: Jeni Tennison <jeni at jenitennison dot com>
- To: Bodrul Haque <Bodrul dot Haque at Synergy-Logistics dot co dot uk>
- Cc: xsl-list at lists dot mulberrytech dot com
- Date: Fri, 19 Jul 2002 16:46:07 +0100
- Subject: Re: [xsl] String manipulation question
- Organization: Jeni Tennison Consulting Ltd
- References: <60779EBEFA89D311859300105A420FFB3B2DCC@syndicate.synlog.co.uk>
- Reply-to: xsl-list at lists dot mulberrytech dot com
Hi Bodrul,
> I've never used any of these external libraries before. For future
> reference, do I just declare the library(eg EXSLT library) namespace
> and that's it!
Nope, you have to download the template somewhere local and import it
into your stylesheet. You also have to declare the namespace in order
to call the template:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:date="http://exslt.org/dates-and-times"
exclude-result-prefixes="date">
<xsl:import href="date.format-date.template.xsl" />
...
<xsl:call-template name="date:format-date">
<xsl:with-param name="date-time" select="'2002-03-04'" />
<xsl:with-param name="pattern" select="'d mmm yy'" />
</xsl:call-template>
...
</xsl:stylesheet>
Actually, you probably need date.parse-date.template.xsl as well (or
instead -- I misinterpreted what you were doing) in order to get your
original date into the standard ISO format so that it can be
formatted. See http://www.exslt.org/date/functions/parse-date/.
Cheers,
Jeni
---
Jeni Tennison
http://www.jenitennison.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list