This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: String manipulation question


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]