Menu

#411 xsl:sort with content within xsl:apply-templates

v8.5.1
closed
5
2014-05-29
2005-10-14
Michael Kay
No

When xsl:sort is used within xsl:apply-templates, and
the sort key is computed using a sequence constructor
(child elements of the xsl:sort element) rather than
using a select attribute, Saxon fails typically with a
NullPointerException.

Source fix:

At line 150 of net.sf.saxon.style.XSLApplyTemplates,
before the line that reads

    ApplyTemplates app = new ApplyTemplates(

insert

    compileSequenceConstructor(exec,

iterateAxis(Axis.CHILD), true);

Michael Kay

Discussion