You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by bu...@apache.org on 2002/11/14 22:51:00 UTC

DO NOT REPLY [Bug 14575] New: - Cannot get back to document context during extension function use

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14575>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

Cannot get back to document context during extension function use

           Summary: Cannot get back to document context during extension
                    function use
           Product: XalanJ2
           Version: 2.4
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: org.apache.xalan.extensions
        AssignedTo: xalan-dev@xml.apache.org
        ReportedBy: georgec@towers.com


When calling the standard Xalan extension function tokenize() in an xsl:for-
each loop, you cannot get back to the root of the currently processing document 
or anything below the root.  So, for example, if you have the following 
scenario:

<xsl:for-each select="xalan:tokenize(string)">
    <!-- this will print a blank -->
    <xsl:value-of select="/SomeElement/Value" />
</xsl:for-each>

I have tried using both the Xalan tokenize() and the EXSLT:string tokenize() 
and both work the same way, leading me to believe that it's a problem in the 
way extension functions work.

Please see the attached test files for the code that causes these problems.  In 
order to see the differences, you'll need to change lines 637 and 640 in the 
stylesheet and remove the reference to the $ROOT parameter.  You may also need 
to change the path to an externally referenced file (on line 16).