xsl-list
[Top] [All Lists]

Re: [xsl] current month xslt 1.0

2010-11-29 12:04:22
Patrick,

if the processor supports XSLT 1.0 only, then no as Dimitre said.


But if EXSLT dates and times package is available:
Use
      http://exslt.org/date/functions/date-time/index.html
to get the current date and
      http://exslt.org/date/functions/month-name/index.html
to get the month.

What XSLT processor do you use?
Even some Web browsers support EXSLT at least partially.

(http://publib.boulder.ibm.com/infocenter/wsdatap/v3r8m1/index.jsp?topic=/xs40/extensionfunctions153.htm)

Mit besten Gruessen / Best wishes,

Hermann Stamm-Wilbrandt
Developer, XML Compiler, L3
Fixpack team lead
WebSphere DataPower SOA Appliances
----------------------------------------------------------------------
IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Martin Jetter
Geschaeftsfuehrung: Dirk Wittkopp
Sitz der Gesellschaft: Boeblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294


From:       Dimitre Novatchev <dnovatchev(_at_)gmail(_dot_)com>
To:         xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Date:       11/29/2010 02:21 PM
Subject:    Re: [xsl] current month xslt 1.0



On Mon, Nov 29, 2010 at 12:14 AM, Szabo, Patrick (LNG-VIE)
<patrick(_dot_)szabo(_at_)lexisnexis(_dot_)at> wrote:
Hi,

Is there a way to determine the current month with nativ xslt 1.0 !?

No, there isn't a current-month() function in XPath 1.0 and neither is
this information part of the static context.

There is a workaround: Pass the current month as a parameter on
invoking the XSLT transformation.

Cheers,
Dimitre Novatchev
---------------------------------------
Truly great madness cannot be achieved without significant intelligence.
---------------------------------------
To invent, you need a good imagination and a pile of junk
-------------------------------------
Never fight an inanimate object
-------------------------------------
You've achieved success in your field when you don't know whether what
you're doing is work or play

--~------------------------------------------------------------------
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>
--~--

<Prev in Thread] Current Thread [Next in Thread>