IBM Support

DataPower compiler error: Fatal Error at local:///some.xsl:20: invalid qname: #current

Troubleshooting


Problem

When running an XSL stylesheet with the mode attribute of a element set to either #current or #all, you receive a compiler error.

Symptom

Fatal Error at local:///some.xsl:20: invalid qname: #current

Cause

The mode tokens #current and #all are features of XSLT2.0

Resolving The Problem

When running an XSL stylesheet with the mode attribute of a <xsl:template match> element set to either #current or #all, and DataPower compile options set to XSLT 2.0, you receive the following error message:

Fatal Error at local:///some.xsl:20: invalid qname: #current

Fatal Error at local:///someother.xsl:6: invalid qname: #all

For example:

<xsl:template match="foobar" mode="#current">

will result in this error. This is due to the limited support of XSLT 2.0 on DataPower.

According to http://www.w3.org/TR/xslt20/#dt-current-mode and http://www.w3.org/TR/xslt20/#modes, the mode tokens #current and #all are features of XSLT2.0 only and are not yet supported by DataPower.

XSLT 2.0 and XPath 2.0 support is currently limited to the decimal data type. Specifically, numeric literals in the stylesheet are interpreted as decimals (instead of double-precision floating point numbers as in 1.0), and the xs:decimal() constructor function is supported for converting other data types to decimal.

[{"Product":{"code":"SS9H2Y","label":"IBM DataPower Gateway"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"General","Platform":[{"code":"PF009","label":"Firmware"}],"Version":"4.0.2;5.0.0;6.0.0;6.0.1","Edition":"Edition Independent","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
08 June 2021

UID

swg21318492