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.
Contents
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
zw:last-modified(document("filename.xml")).
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):
xmlns:zw="java:cz.euweb.icebearsoft.saxon.ExtUtils" |
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
extutils.jar and 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 extutils.jar and saxon8.jar in the same
directory, you can use a simpler way (of course the path to extutils.jar must be
specified):
java -jar extutils.jar filename ... |
The simpler method works since version marked in MANIFEST.MF as:
Implementation-Version: 1.0.0 |
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 ~/.antrc must
contain:
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