xsl:sort does not work with nodeset variables
---------------------------------------------

         Key: XALANJ-2180
         URL: http://issues.apache.org/jira/browse/XALANJ-2180
     Project: XalanJ2
        Type: Bug
  Components: Xalan  
    Versions: CurrentCVS    
 Environment: Java Plug-in 1.5.0_04 creates DocumentBuilderFactory, 
TransformerFactory, Transformer objects etc. using newInstance() methods.
    Reporter: dcaveney
 Attachments: sortbug.xsl

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>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to