The stylesheets have a feature to generate date and time strings. These can be used to insert the processing date for display or for meta data. These features make use of the EXSLT
date-time() function. That function is supported by the Saxon, Xalan, and xsltproc processors, but not MSXSL.
There is no DocBook element that represents the current date, so the stylesheets use a processing instruction to insert a timestamp. Here is an example:
<para>This document was generated <?dbtimestamp format="Y-m-d H:M:S"?>.</para>
When processed, this input will result in the following output in either HTML or print:
This document was generated 2003-07-23 12:13:00.
|Date-time format letter||Example||Description|
|c||2003-07-10-07:00 12:20:33-07:00||Complete ISO date and time, including offset from UTC.|
|d||10||Day in month|
|H||11||Hour in day|
|j||191||Day in year|
|m||07||Month in year|
|M||20||Minute in hour|
|S||14||Second in minute|
|U||28||Week in year|
|w||5||Day in week (Sunday = 1)|
Any other characters in the format string are passed through, allowing you to add punctuation as needed.
|DocBook XSL: The Complete Guide - 3rd Edition||PDF version available|
Copyright © 2002-2005 Sagehill Enterprises