extension functions disabled in Saxon B XSLT 2.0 processor
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
saxonb (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
---- modified description to describe how to re-enable extension functions ----
The extension functions are disabled by default in the Saxon B XSLT 2.0 processor that is packaged for Ubuntu/Debian. The resulting error messages can be confusing, especially to those following directions that apply for the original upstream packaging, which enables extension functions by default. The error message and/or documentation should clarify the issues and options more clearly - e.g. that if the XSLT stylesheet is trusted as an executable application, extensions can be re-enabled via the "-ext:on" option.
---- continuing from the original bug description ----
If there are are strong reasons for disabling these functions, this should be clearly expressed in the manual pages. (Note, that the manual is otherwise very complete, and descriptive.)
As an example, currently it is not possible to use the often-required xsl:result-document function:
$ saxonb-xslt -t -xsl:test.xsl -s:test.xml
Saxon 9.0.0.4J from Saxonica
Java version 1.6.0_14
Error at xsl:result-document on line 5 of file:/home/
xsl:result-
Failed to compile stylesheet. 1 error detected.
The same error happens when the program is invoked directly, circumventing the shipped script:
$ java -classpath /usr/share/
Error at xsl:result-document on line 5 of file:/home/
xsl:result-
Failed to compile stylesheet. 1 error detected.
The 'test.xsl' stylesheet file:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0"
xmlns:xsl="http://
<xsl:template match="value">
<
<test>
</test>
<
</xsl:template>
</xsl:stylesheet>
The 'test.xml' source XML file:
<?xml version='1.0' encoding='UTF-8'?>
<data>
<value>
<value>
<value>
<value>
<value>
<value>
</data>
Changed in saxonb (Ubuntu): | |
status: | New → Confirmed |
description: | updated |
I was just told, that the -ext option enables the extension functions.
In fact, the stylesheet is processed correctly, now:
$ saxonb-xslt -ext:on -xsl:test.xsl -s:test.xml
In retrospect, I would ask, if this situation could be expressed more clearly in the manual page. Actually, it reads like:
-ext: {[on] | [off]}
potential security risk when processing untrusted files. Default:
Enable or disable the ability to invoke external Java functions
from query files and stylesheets. Beware that enabling them is a
off.
But since I was trying to use a standard XSLT function (xsl:result- document) , and not an arbitrary Java function, I didn't guess that this -ext option was the key to this problem.
Maybe a description near the top, like the following could help: "Some instructions like xsl:result-document require the -ext option to be enabled."
If that is not possible, at least the terminology should be unified: The error message complains about disabled "extension functions", while the manual page describes "external Java functions".
Thank you!