This package contains a small extension function which can report the file modification time in the ISO 8601 format. It was tested with Saxon 8.5. It will not work with Saxon 6.x and older because the package names have changed.
Note: These functions were modified by Michael Kay and included as Saxon extension functions.
|1.||zw:last-modified() as xs:dateTime|
|2.||zw:last-modified(node $node) as xs:dateTime|
|3.||zw:file-timestamp(xs:string filename) as xs:dateTime|
|4.||Installation and usage|
|7.||Note for OS/2 (eComStation) users|
The function returns the modification time of the file containing the context node. If the node does not belong to a file on a local disk, an empty string is returned.
The function returns the modification time of the file containing the specified node. If the node does not belong to a file on a local disk, an empty string is returned.
The function returns the modification time of the file the name of which is supplied
as a parameter. The name must not contain the
file: prefix. If the file does not
exist, an empty string is returned. If you wish to get modification time of an XML file, it is
preferable to use
After unzipping the distribution you will get
extutils.jar in the
lib subdirectory. Before calling Saxon you have to add this file to your
CLASSPATH or specify it in the
-classpath argument. You then have to
declare the following namespace in your stylesheet (you can use any namespace prefix,
zw: is just an example):
The distribution contains the stylesheet
test.xsl which demonstrates
usage and can be used for testing. You can also use the command line test. You have to put both
saxon8.jar to your
CLASSPATH and invoke:
java cz.euweb.icebearsoft.saxon.ExtUtils filename ...
You may specify any number of file names. The module will display all system properties and the file modification times for each file.
If you have
saxon8.jar in the same
directory, you can use a simpler way (of course the path to
extutils.jar must be
java -jar extutils.jar filename ...
The simpler method works since version marked in
The distribution contains the Ant build file and the environment setting scripts for
OS/2 and Linux. It is assumed that the
SAXON8_JAR environment variable contains the
full path to your
saxon8.jar. If you are using Linux, your
if [ -f .antrc ] ; then . .antrc fi
The module was developed in OS/2, the files therefore have DOS line endings.
If you are using Innotek java, be sure that you have the latest version. Version 1.4.2_02 did not handle correctly daylight savings, version 1.4.2_05 works well.
Download extutils.zip 12 KB