XSLT 2.0 implementation
The standard URI resolver for the unparsed-text() function now follows the spec more closely by examining the media type of the retrieved resource (which will typically be available only if it is obtained via an HTTP connection). In this case, if the media type indicates XML, the encoding is inferred as described in the XML specification, ignoring any encoding that was requested in the second argument. The URI resolver now also has a debug flag allowing tracing of the process of connection, examination of HTTP headers, and inference of an encoding.
The system-property() function has changed so that, with the exception of properties in the XSLT namespace,
the function is always evaluated at run-time rather than at compile time. This is because the values of system properties
in the execution environment may differ from their values at compile time. When the configuration property ALLOW_EXTERNAL_FUNCTIONS
is set to false access to system properties is now disabled: this is because some of them, such as
be considered to compromise security.
The implementation of format-dateTime() and similar functions has changed in the way it handles the
component. This requests the time-zone as a named timezone. This is problematic, because the information is not really
available: the data type maintains only a time zone offset, and different countries (time zones) use different names
for the same offset, at different times of year. If the value is a date or dateTime, and if the country argument is
supplied, Saxon now uses the Java database of time zones and daylight savings time (summer time) changeover dates
to work out the most likely timezone applicable to the date in question. This is still a guess, but it is now more
likely to be right.
If the timezone is formatted as [ZN,6] (specifically, with a minimum length of 6 or more) then the Olsen timezone name
is output (again, this requires the country to be supplied). The Olsen timezone name generally takes the form
Continent/City, for example "Europe/London" or "America/Los_Angeles". If the date/time is in daylight
savings time for that timezone, an asterisk is appended to the Olsen timezone name.
The formatting of noon/midnight in the 12-hour clock has been changed. Although in the USA it seems to be fairly
common (though not universal) to represent noon as "pm" and midnight as "am", this usage does not appear to be widely accepted
in the UK. Therefore, if a maximum width of 8 or more characters is specified (thus:
[Pn,*-8]), noon and midnight
will now be written in full.
Saxon now implements the rule that within a single stylesheet module, all the
use-when expressions will see
stable values for functions such as
The implementation of
xsl:copy-of has changed so that when a document or element node is copied,
if line numbering was requested at the configuration level, then line numbers of element nodes are copied from the
source document to the result document. For other instructions that create elements, the line number of the resulting
element will reflect the position in the stylesheet or query of the instruction that created the element. The line
number is accessible using the saxon:line-number() function. When running from the command line, this works only
-l option is specified, or if a trace listener is in use.
The custom Ant task for running Saxon has been fleshed out with additional attributes to give greater control over the transformation process. Detail are here.