http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2307

*** shadow/2307 Mon Jun 25 06:53:04 2001
--- shadow/2307.tmp.9818        Fri Jul 13 18:45:56 2001
***************
*** 2,9 ****
  | An extension function cannot return a NodeIterator.                        |
  +----------------------------------------------------------------------------+
  |        Bug #: 2307                        Product: XalanJ2                 |
! |       Status: NEW                         Version: 2.1.0                   |
! |   Resolution:                            Platform: Other                   |
  |     Severity: Normal                   OS/Version: All                     |
  |     Priority: Other                     Component: org.apache.xalan.extens |
  +----------------------------------------------------------------------------+
--- 2,9 ----
  | An extension function cannot return a NodeIterator.                        |
  +----------------------------------------------------------------------------+
  |        Bug #: 2307                        Product: XalanJ2                 |
! |       Status: RESOLVED                    Version: 2.1.0                   |
! |   Resolution: INVALID                    Platform: Other                   |
  |     Severity: Normal                   OS/Version: All                     |
  |     Priority: Other                     Component: org.apache.xalan.extens |
  +----------------------------------------------------------------------------+
***************
*** 92,95 ****
    <xsl:template match="/">
        <xsl:for-each select="java:getNodeList(java:Iterator.new())" />
    </xsl:template>
! </xsl:stylesheet>
--- 92,115 ----
    <xsl:template match="/">
        <xsl:for-each select="java:getNodeList(java:Iterator.new())" />
    </xsl:template>
! </xsl:stylesheet>
! 
! ------- Additional Comments From [EMAIL PROTECTED]  2001-07-13 18:45 -------
! I have reviewed the extension documentation and I see that handling of extension 
! function return values is not covered.  I will update the documentation shortly. 
! Basically, a return value from an extension function is converted to an XSLT 
! type, if possible.  For example, a NodeIterator returned from an extension 
! function is converted to an XSLT node-set.  The documentation will contain the 
! complete list of how various return types are handled.  Thus, your expression
!   java:getNodeList(java:Iterator.new())
! is processed as follows:  First the constructor for Iterator is called, which 
! returns an Iterator.  Since this implements the NodeIterator interface, it is 
! converted to an XSLT node-set.  Thus, the expression becomes
!   java:getNodeList(an-xslt-node-set)
! The extension mechanism will look for the getNodeList() method on a Xalan class 
! that represents an xslt node-set and that fails.  The following (simpler) 
! expression will accomplish exactly what you want:
!   <xsl:for-each select="java:Iterator.new()" />
! Please reply here or to the list if you have questions.
! Thanks,
! Gary

Reply via email to