[xsl] RE: Operational system date

Subject: [xsl] RE: Operational system date
From: Daniel O'Donnell <daniel.odonnell@xxxxxxxx>
Date: Tue, 08 Mar 2005 11:35:35 -0700
Using the exslt functions in xslt 1.0 is not very hard. Here's what to do:

1) download the date and numerical format material from exslt.org
2) Put the following attribute in your xsl:stylesheet root element:

xmlns:date="http://exslt.org/dates-and-times";


3) put the following include at the top level of your document (right after the root element).
<xsl:include href="path-to-installed-the-exslt-elements/date.xsl" />


4) Add the function to your sheet where you want it to appear:

	<xsl:choose>
	  <xsl:when test="function-available('date:date-time')">
	    (<xsl:value-of select="date:date-time()"/>)
	  </xsl:when>
	  <xsl:otherwise>
	  </xsl:otherwise>
	</xsl:choose>


The only problem I had when I did this, was there was a bad include in one of the exslt stylesheets (it was looking in the wrong directory for a padding stylesheet). It wasn't hard to fix, though.
--
Daniel Paul O'Donnell, PhD
Associate Professor of English
University of Lethbridge
Lethbridge AB T1K 3M4
Tel. (403) 329-2377
Fax. (403) 382-7191
E-mail <daniel.odonnell@xxxxxxxx>
Home Page <http://people.uleth.ca/~daniel.odonnell/>
The Digital Medievalist Project: <http://www.digitalmedievalist.org/>


Current Thread