Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
2.6
-
None
-
None
-
Java Plug-in 1.5.0_04 creates DocumentBuilderFactory, TransformerFactory, Transformer objects etc. using newInstance() methods.
Description
The symptoms I'm seeing are the same as in issue #Xalanj-860 but I can't use the same workaround. A template creates some elements within a variable, and then tries to sort the resulting nodeset. The following example produces no output:
<?xml version="1.0" encoding="UTF-8"?>
<stylesheet xmlns="http://www.w3.org/1999/XSL/Transform" xmlns:xalan="http://xml.apache.org/xalan" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<output method="text"/>
<template match="/">
<variable name="foo">
<xsl:element name="bar">
<xsl:attribute name="priority">1</xsl:attribute>
<text>Priority = 1</text>
</xsl:element>
<xsl:element name="bar">
<xsl:attribute name="priority">2</xsl:attribute>
<text>Priority = 2</text>
</xsl:element>
</variable>
<for-each select="xalan:nodeset($foo)/xsl:bar">
<xsl:sort data-type="number" order="descending" select="@priority"/>
<value-of select="text()"/>
</for-each>
</template>
</stylesheet>